Skip to content

Commit 107de6a

Browse files
author
git apple-llvm automerger
committed
Merge commit '2e31fa34a45f' from swift/release/5.9 into stable/20221013
2 parents b210b13 + 2e31fa3 commit 107de6a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,13 @@ TypeSP TypeSystemSwiftTypeRef::LookupClangType(
229229
return result;
230230
}
231231

232-
SwiftASTContext *target_holder = GetSwiftASTContext();
233-
if (!target_holder)
234-
return {};
235-
TargetSP target_sp = target_holder->GetTargetWP().lock();
232+
TargetSP target_sp = GetTargetWP().lock();
233+
if (!target_sp) {
234+
SwiftASTContext *target_holder = GetSwiftASTContext();
235+
if (!target_holder)
236+
return {};
237+
target_sp = target_holder->GetTargetWP().lock();
238+
}
236239
if (!target_sp)
237240
return {};
238241
target_sp->GetImages().ForEach([&](const ModuleSP &module) -> bool {

0 commit comments

Comments
 (0)