Differential D70196 Diff 229146 clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
Changeset View
Changeset View
Standalone View
Standalone View
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | else: | ||||
build_path = find_compilation_database(db_path) | build_path = find_compilation_database(db_path) | ||||
tmpdir = tempfile.mkdtemp() | tmpdir = tempfile.mkdtemp() | ||||
# Load the database and extract all files. | # Load the database and extract all files. | ||||
database = json.load(open(os.path.join(build_path, db_path))) | database = json.load(open(os.path.join(build_path, db_path))) | ||||
files = [entry['file'] for entry in database] | files = [entry['file'] for entry in database] | ||||
# Filter out .rc files on Windows. CMake includes them for some reason. | |||||
files = [f for f in files if not f.endswith('.rc')] | |||||
max_task = args.j | max_task = args.j | ||||
if max_task == 0: | if max_task == 0: | ||||
max_task = multiprocessing.cpu_count() | max_task = multiprocessing.cpu_count() | ||||
try: | try: | ||||
# Spin up a bunch of tidy-launching threads. | # Spin up a bunch of tidy-launching threads. | ||||
queue = Queue.Queue(max_task) | queue = Queue.Queue(max_task) | ||||
for _ in range(max_task): | for _ in range(max_task): | ||||
Show All 24 Lines |