summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 5c7d79e3c6b..10dce60cbbb 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -19,8 +19,11 @@
#include "lldb/Core/Stream.h"
#include "lldb/Host/File.h"
+#include "lldb/Host/FileSystem.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
+#include "llvm/Support/ConvertUTF.h"
+
#include <stdio.h>
#include "llvm/ADT/StringSwitch.h"
@@ -1162,9 +1165,7 @@ PythonFile::PythonFile(File &file, const char *mode)
PythonFile::PythonFile(const char *path, const char *mode)
{
- FILE *fp = nullptr;
- fp = fopen(path, mode);
- lldb_private::File file(fp, true);
+ lldb_private::File file(path, GetOptionsFromMode(mode));
Reset(file, mode);
}
OpenPOWER on IntegriCloud