Skip to content

Commit 32fa093

Browse files
authored
[lldb] Unlock Swift scratch context before early return
1 parent cb6c718 commit 32fa093

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Target/Target.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2309,8 +2309,10 @@ Target::GetScratchTypeSystemForLanguage(lldb::LanguageType language,
23092309
m_scratch_type_system_map.RemoveTypeSystemsForLanguage(language);
23102310
type_system_or_err = m_scratch_type_system_map.GetTypeSystemForLanguage(
23112311
language, this, create_on_demand, compiler_options);
2312-
if (!type_system_or_err)
2312+
if (!type_system_or_err) {
2313+
GetSwiftScratchContextLock().unlock();
23132314
return type_system_or_err.takeError();
2315+
}
23142316

23152317
if (auto *new_swift_ast_ctx =
23162318
llvm::dyn_cast_or_null<SwiftASTContextForExpressions>(

0 commit comments

Comments
 (0)