Skip to content

Commit 2247eb3

Browse files
Merge pull request #10461 from adrian-prantl/147785337
[lldb] Avoid costly SwiftASTContext fallback for builtin types
2 parents 086459d + beadba7 commit 2247eb3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@ SwiftLanguageRuntime::GetNumChildren(CompilerType type,
757757
//
758758
// However, some imported Clang types (specifically enums) will also produce
759759
// `BuiltinTypeInfo` instances. These types are not to be handled here.
760+
if (TypeSystemSwiftTypeRef::IsBuiltinType(type))
761+
return 0;
762+
760763
LLDB_LOG(GetLog(LLDBLog::Types),
761764
"{0}: unrecognized builtin type info or this is a Clang type "
762765
"without DWARF debug info",
@@ -1162,6 +1165,9 @@ SwiftLanguageRuntime::GetIndexOfChildMemberWithName(
11621165
}
11631166
}
11641167
case TypeInfoKind::Builtin: {
1168+
if (TypeSystemSwiftTypeRef::IsBuiltinType(type))
1169+
return {SwiftLanguageRuntime::eNotFound, {}};
1170+
11651171
CompilerType clang_type;
11661172
if (ts.IsImportedType(type.GetOpaqueQualType(), &clang_type)) {
11671173
clang_type = GetTypedefedTypeRecursive(clang_type);

0 commit comments

Comments
 (0)