[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / use_lldb_suite_root.py
blobd33e280ba11aeba82557cafe7b7610dcdf8470ae
1 import inspect
2 import os
3 import sys
6 def add_third_party_module_dirs(lldb_root):
7 third_party_modules_dir = os.path.join(
8 lldb_root, "third_party", "Python", "module")
9 if not os.path.isdir(third_party_modules_dir):
10 return
12 module_dirs = os.listdir(third_party_modules_dir)
13 for module_dir in module_dirs:
14 module_dir = os.path.join(third_party_modules_dir, module_dir)
15 sys.path.insert(0, module_dir)
18 def add_lldbsuite_packages_dir(lldb_root):
19 packages_dir = os.path.join(lldb_root, "packages", "Python")
20 sys.path.insert(0, packages_dir)
22 lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
24 add_third_party_module_dirs(lldb_root)
25 add_lldbsuite_packages_dir(lldb_root)