Skip to content

Commit f211cf6

Browse files
authored
Merge pull request #211 from JDevlieghere/disable-parallel-import-during-replay
[Reproducer] Disable parallel module import in SwiftASTContext during replay
2 parents 4eeb7e3 + bae9f04 commit f211cf6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Symbol/SwiftASTContext.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,10 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
19481948
// the Clang modules that were imported in this module. This can
19491949
// be a lot of work (potentially ten seconds per module), but it
19501950
// can be performed in parallel.
1951-
llvm::ThreadPool pool;
1951+
const unsigned threads = repro::Reproducer::Instance().IsReplaying()
1952+
? 1
1953+
: llvm::hardware_concurrency();
1954+
llvm::ThreadPool pool(threads);
19521955
for (size_t mi = 0; mi != num_images; ++mi) {
19531956
auto module_sp = target.GetImages().GetModuleAtIndex(mi);
19541957
pool.async([=] {

0 commit comments

Comments
 (0)