Skip to content

Commit 821a802

Browse files
kastiglioneadrian-prantl
authored andcommitted
[lldb] Unlock Swift scratch context before early return
(cherry picked from commit 32fa093)
1 parent 900c3b6 commit 821a802

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Target/Target.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2319,8 +2319,10 @@ Target::GetScratchTypeSystemForLanguage(lldb::LanguageType language,
23192319
m_scratch_type_system_map.RemoveTypeSystemsForLanguage(language);
23202320
type_system_or_err = m_scratch_type_system_map.GetTypeSystemForLanguage(
23212321
language, this, create_on_demand, compiler_options);
2322-
if (!type_system_or_err)
2322+
if (!type_system_or_err) {
2323+
GetSwiftScratchContextLock().unlock();
23232324
return type_system_or_err.takeError();
2325+
}
23242326

23252327
if (auto *new_swift_ast_ctx =
23262328
llvm::dyn_cast_or_null<SwiftASTContextForExpressions>(

0 commit comments

Comments
 (0)