Skip to content

Commit 7bf69f7

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e7bb1b104047' from swift/release/5.5 into swift/main
2 parents d6ecb63 + e7bb1b1 commit 7bf69f7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,18 @@ static void AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp,
586586

587587
Flags imported_self_type_flags(imported_self_type.GetTypeInfo());
588588

589-
swift::Type object_type =
590-
GetSwiftType(imported_self_type)->getWithoutSpecifierType();
589+
auto swift_self_type = GetSwiftType(imported_self_type);
590+
if (!swift_self_type) {
591+
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TYPES |
592+
LIBLLDB_LOG_EXPRESSIONS));
593+
if (log)
594+
log->Printf("Couldn't get SwiftASTContext type for self type %s.",
595+
imported_self_type.GetDisplayTypeName().AsCString("<unknown>"));
596+
597+
return;
598+
}
599+
600+
swift::Type object_type = swift_self_type->getWithoutSpecifierType();
591601

592602
if (object_type.getPointer() &&
593603
(object_type.getPointer() != imported_self_type.GetOpaqueQualType()))

0 commit comments

Comments
 (0)