We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b89a2a commit e90fe50Copy full SHA for e90fe50
lldb/source/Target/Target.cpp
@@ -2737,6 +2737,14 @@ llvm::Optional<SwiftScratchContextReader> Target::GetSwiftScratchContext(
2737
DisplayFallbackSwiftContextErrors(cached_ast_ctx);
2738
// Try again.
2739
// FIXME: Shouldn't this continue rather than return?
2740
+ auto &lock = GetSwiftScratchContextLock();
2741
+ if (!lock.try_lock()) {
2742
+ if (log)
2743
+ log->Printf("module scratch context has errors but couldn't "
2744
+ "acquire scratch context lock\n");
2745
+ return;
2746
+ }
2747
+ std::lock_guard<std::shared_mutex> unlock(lock, std::adopt_lock);
2748
m_scratch_typesystem_for_module.erase(key);
2749
if (log)
2750
log->Printf("erased module-wide scratch context with errors\n");
0 commit comments