Skip to content

Commit 7d4a1c2

Browse files
committed
[APINotes] Adjust Swift LLDB logic for the API changes
rdar://113403829
1 parent 9257af2 commit 7d4a1c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,9 @@ TypeSystemSwiftTypeRef::GetSwiftName(const clang::Decl *clang_decl,
869869
// The order is significant since some of these decl kinds are also
870870
// TagDecls.
871871
if (llvm::isa<clang::TypedefNameDecl>(clang_decl))
872-
swift_name = ExtractSwiftName(reader->lookupTypedef(default_name));
872+
// FIXME: this should pass the correct context instead of nullopt.
873+
swift_name =
874+
ExtractSwiftName(reader->lookupTypedef(std::nullopt, default_name));
873875
else if (llvm::isa<clang::EnumConstantDecl>(clang_decl))
874876
swift_name = ExtractSwiftName(reader->lookupEnumConstant(default_name));
875877
else if (llvm::isa<clang::ObjCInterfaceDecl>(clang_decl))
@@ -878,7 +880,9 @@ TypeSystemSwiftTypeRef::GetSwiftName(const clang::Decl *clang_decl,
878880
swift_name =
879881
ExtractSwiftName(reader->lookupObjCProtocolInfo(default_name));
880882
else if (llvm::isa<clang::TagDecl>(clang_decl))
881-
swift_name = ExtractSwiftName(reader->lookupTag(default_name));
883+
// FIXME: this should pass the correct context instead of nullopt.
884+
swift_name =
885+
ExtractSwiftName(reader->lookupTag(std::nullopt, default_name));
882886
else {
883887
assert(false && "unhandled clang decl kind");
884888
}

0 commit comments

Comments
 (0)