[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:
1 parent
d1932dcdd3
commit
50bc1ed290
19 files changed
+199
-220
No files matched your search
@@ -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