From 50bc1ed290824218a1bb46f70ec731712da610b0 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 2 Nov 2018 22:34:51 +0000 Subject: [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 --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 90d8ab97fb7..45ffd0813d4 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -939,7 +939,8 @@ PythonFile::PythonFile() : PythonObject() {} PythonFile::PythonFile(File &file, const char *mode) { Reset(file, mode); } PythonFile::PythonFile(const char *path, const char *mode) { - lldb_private::File file(path, GetOptionsFromMode(mode)); + lldb_private::File file; + FileSystem::Instance().Open(file, FileSpec(path), GetOptionsFromMode(mode)); Reset(file, mode); } -- cgit v1.2.3