diff options
author | Pavel Labath <labath@google.com> | 2018-06-20 08:35:45 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-06-20 08:35:45 +0000 |
commit | 2df331b0f78b90a5b0be1e247f3cce97709af964 (patch) | |
tree | 3db24e1ba9d0a8ef84761453bd883172a98d587c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h | |
parent | f29d777f847b2a3d0aec2a499490fa34815fc918 (diff) | |
download | llvm-2df331b0f78b90a5b0be1e247f3cce97709af964.zip llvm-2df331b0f78b90a5b0be1e247f3cce97709af964.tar.gz llvm-2df331b0f78b90a5b0be1e247f3cce97709af964.tar.bz2 |
Remove dependency from Host to python
Summary:
The only reason python was used in the Host module was to compute the
python path. I resolve this the same way as D47384 did for clang, by
moving the path computation into the python plugin and modifying
SBHostOS class to call into this module for ePathTypePythonDir.
Reviewers: zturner, jingham, davide
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D48215
llvm-svn: 335104
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h index a71fcea..628b71f 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h @@ -445,6 +445,8 @@ public: static const char *GetPluginDescriptionStatic(); + static FileSpec GetPythonDir(); + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ @@ -509,6 +511,10 @@ protected: static void AddToSysPath(AddLocation location, std::string path); + static void ComputePythonDirForApple(llvm::SmallVectorImpl<char> &path); + static void ComputePythonDirForPosix(llvm::SmallVectorImpl<char> &path); + static void ComputePythonDirForWindows(llvm::SmallVectorImpl<char> &path); + bool EnterSession(uint16_t on_entry_flags, FILE *in, FILE *out, FILE *err); void LeaveSession(); |