[FileSystem] Open File instances through the FileSystem.
This patch modifies how we open File instances in LLDB. Rather than passing a path or FileSpec to the constructor, we now go through the virtual file system. This is needed in order to make things work with the VFS in the future. Differential revision: https://reviews.llvm.org/D54020 llvm-svn: 346049
This commit is contained in:
@@ -829,11 +829,15 @@ bool ScriptInterpreterPython::ExecuteOneLine(
|
||||
error_file_sp);
|
||||
} else {
|
||||
input_file_sp.reset(new StreamFile());
|
||||
input_file_sp->GetFile().Open(FileSystem::DEV_NULL,
|
||||
File::eOpenOptionRead);
|
||||
FileSystem::Instance().Open(input_file_sp->GetFile(),
|
||||
FileSpec(FileSystem::DEV_NULL),
|
||||
File::eOpenOptionRead);
|
||||
|
||||
output_file_sp.reset(new StreamFile());
|
||||
output_file_sp->GetFile().Open(FileSystem::DEV_NULL,
|
||||
File::eOpenOptionWrite);
|
||||
FileSystem::Instance().Open(output_file_sp->GetFile(),
|
||||
FileSpec(FileSystem::DEV_NULL),
|
||||
File::eOpenOptionWrite);
|
||||
|
||||
error_file_sp = output_file_sp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user