Skip to content

Commit 805872d

Browse files
author
git apple-llvm automerger
committed
Merge commit '6779a953f891' from swift/release/5.3 into swift/master
2 parents 4510748 + 6779a95 commit 805872d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/Target/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,9 @@ llvm::Optional<uint64_t> SwiftLanguageRuntimeImpl::GetMemberVariableOffset(
639639

640640
llvm::Optional<SwiftASTContextReader> scratch_ctx;
641641
if (instance) {
642-
scratch_ctx = instance->GetScratchSwiftASTContext();
643-
if (!scratch_ctx)
642+
if (SwiftASTContextReader reader = instance->GetScratchSwiftASTContext())
643+
scratch_ctx = reader;
644+
else
644645
return llvm::None;
645646
}
646647

0 commit comments

Comments
 (0)