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