@@ -3219,6 +3219,16 @@ bool TypeSystemSwiftTypeRef::DumpTypeValue(
3219
3219
ReconstructType (type), s, format, data, data_offset, data_byte_size,
3220
3220
bitfield_bit_size, bitfield_bit_offset, exe_scope, is_base_class);
3221
3221
}
3222
+ case Node::Kind::TypeAlias:
3223
+ case Node::Kind::BoundGenericTypeAlias: {
3224
+ // This means we have an unresolved type alias that even
3225
+ // SwiftASTContext couldn't resolve. This happens for ObjC
3226
+ // typedefs such as CFString in the REPL. More investigation is
3227
+ // needed.
3228
+ return m_swift_ast_context->DumpTypeValue (
3229
+ ReconstructType (type), s, format, data, data_offset, data_byte_size,
3230
+ bitfield_bit_size, bitfield_bit_offset, exe_scope, is_base_class);
3231
+ }
3222
3232
default :
3223
3233
assert (false && " Unhandled node kind" );
3224
3234
LLDB_LOGF (GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES),
@@ -3487,16 +3497,23 @@ TypeSystemSwiftTypeRef::GetGenericArgumentType(opaque_compiler_type_t type,
3487
3497
(ReconstructType (type), idx));
3488
3498
}
3489
3499
#ifndef NDEBUG
3490
- bool TypeSystemSwiftTypeRef::ShouldSkipValidation (opaque_compiler_type_t type) { \
3491
- // NSNotificationName is a typedef to a NSString in clang type, but it's a
3500
+ bool TypeSystemSwiftTypeRef::ShouldSkipValidation (opaque_compiler_type_t type) {
3501
+ auto mangled_name = GetMangledTypeName (type);
3502
+ // NSNotificationName is a typedef to a NSString in clang type, but it's a
3492
3503
// struct in SwiftASTContext. Skip validation in this case.
3504
+ if (mangled_name == " $sSo18NSNotificationNameaD" )
3505
+ return true ;
3506
+
3493
3507
// $s10Foundation12NotificationV4NameaD is a typealias to NSNotificationName,
3494
3508
// so we skip validation in that casse as well.
3495
- auto mangled_name = GetMangledTypeName (type);
3496
- if (mangled_name == " $sSo18NSNotificationNameaD" ||
3497
- mangled_name == " $s10Foundation12NotificationV4NameaD" ||
3498
- mangled_name == " $sSo9NSDecimalaD" )
3499
- return true ;
3509
+ if (mangled_name == " $s10Foundation12NotificationV4NameaD" )
3510
+ return true ;
3511
+ if (mangled_name == " $sSo9NSDecimalaD" )
3512
+ return true ;
3513
+ // Reconstruct($sSo11CFStringRefaD) returns a non-typealias type, breaking
3514
+ // isTypedef().
3515
+ if (mangled_name == " $sSo11CFStringRefaD" )
3516
+ return true ;
3500
3517
3501
3518
// We skip validation when dealing with a builtin type since builtins are
3502
3519
// considered type aliases by Swift, which we're deviating from since
0 commit comments