-
Committer:
vadimcn
-
Date:
2018-10-14 07:24:56 UTC
-
Revision ID:
svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:lldb/trunk:344474
Fix double import of _lldb module.
Fix llvm.org/pr39054:
- Register _lldb as a built-in module during initialization of script interpreter,
- Reverse the order of imports in __init__.py: first try to import by absolute name, which will find the built-in module in the context of lldb (and other hosts that embed liblldb), then try relative import, in case the module is being imported from Python interpreter.
This works for SWIG>=3.0.11; before that, SWIG did not support custom module import code.
Differential revision: https://reviews.llvm.org/D52404