[AMDGPU] Simplify definition of SIbuffer_atomic_*. NFC.
[llvm-project.git] / lldb / use_lldb_suite_root.py
blobfd42f63a3c7f30e273c381368d64f13647294b04
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(lldb_root, "third_party", "Python", "module")
8 if not os.path.isdir(third_party_modules_dir):
9 return
11 module_dirs = os.listdir(third_party_modules_dir)
12 for module_dir in module_dirs:
13 module_dir = os.path.join(third_party_modules_dir, module_dir)
14 sys.path.insert(0, module_dir)
17 def add_lldbsuite_packages_dir(lldb_root):
18 packages_dir = os.path.join(lldb_root, "packages", "Python")
19 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)