@@ -180,7 +180,7 @@ namespace {
180
180
if (!opaquePointer) {
181
181
return Type ();
182
182
}
183
- return {opaquePointer->getDeclaredType (),
183
+ return {opaquePointer->getDeclaredInterfaceType (),
184
184
type.isReferenceType () ? ImportHint::None
185
185
: ImportHint::OtherPointer};
186
186
}
@@ -417,7 +417,7 @@ namespace {
417
417
: Impl.SwiftContext .getUnsafeMutableRawPointerDecl ());
418
418
if (!pointerTypeDecl)
419
419
return Type ();
420
- return {pointerTypeDecl->getDeclaredType (),
420
+ return {pointerTypeDecl->getDeclaredInterfaceType (),
421
421
ImportHint::OtherPointer};
422
422
}
423
423
@@ -964,7 +964,7 @@ namespace {
964
964
memberTypes.push_back (superclassType);
965
965
966
966
for (auto protocolDecl : typeParam->getConformingProtocols ())
967
- memberTypes.push_back (protocolDecl->getDeclaredType ());
967
+ memberTypes.push_back (protocolDecl->getDeclaredInterfaceType ());
968
968
969
969
bool hasExplicitAnyObject = false ;
970
970
if (memberTypes.empty ())
@@ -980,7 +980,7 @@ namespace {
980
980
importedType = BoundGenericClassType::get (
981
981
imported, nullptr , importedTypeArgs);
982
982
} else {
983
- importedType = imported->getDeclaredType ();
983
+ importedType = imported->getDeclaredInterfaceType ();
984
984
}
985
985
986
986
if (!type->qual_empty ()) {
@@ -1028,7 +1028,7 @@ namespace {
1028
1028
if (auto objcClassDef = objcClass->getDefinition ())
1029
1029
bridgedType = mapSwiftBridgeAttr (objcClassDef);
1030
1030
else if (objcClass->getName () == " NSString" )
1031
- bridgedType = Impl.SwiftContext .getStringDecl ()->getDeclaredType ();
1031
+ bridgedType = Impl.SwiftContext .getStringDecl ()->getDeclaredInterfaceType ();
1032
1032
1033
1033
if (bridgedType) {
1034
1034
// Gather the type arguments.
@@ -1083,7 +1083,7 @@ namespace {
1083
1083
keyStructDecl == Impl.SwiftContext .getDictionaryDecl () ||
1084
1084
keyStructDecl == Impl.SwiftContext .getArrayDecl ()) {
1085
1085
if (auto anyHashable = Impl.SwiftContext .getAnyHashableDecl ())
1086
- keyType = anyHashable->getDeclaredType ();
1086
+ keyType = anyHashable->getDeclaredInterfaceType ();
1087
1087
else
1088
1088
keyType = Type ();
1089
1089
}
@@ -1124,7 +1124,7 @@ namespace {
1124
1124
if (!proto)
1125
1125
return Type ();
1126
1126
1127
- members.push_back (proto->getDeclaredType ());
1127
+ members.push_back (proto->getDeclaredInterfaceType ());
1128
1128
}
1129
1129
1130
1130
importedType = ProtocolCompositionType::get (Impl.SwiftContext ,
@@ -1409,14 +1409,14 @@ static ImportedType adjustTypeForConcreteImport(
1409
1409
// Turn BOOL and DarwinBoolean into Bool in contexts that can bridge types
1410
1410
// losslessly.
1411
1411
if (bridging == Bridgeability::Full && canBridgeTypes (importKind))
1412
- importedType = impl.SwiftContext .getBoolDecl ()->getDeclaredType ();
1412
+ importedType = impl.SwiftContext .getBoolDecl ()->getDeclaredInterfaceType ();
1413
1413
break ;
1414
1414
1415
1415
case ImportHint::NSUInteger:
1416
1416
// When NSUInteger is used as an enum's underlying type or if it does not
1417
1417
// come from a system module, make sure it stays unsigned.
1418
1418
if (importKind == ImportTypeKind::Enum || !allowNSUIntegerAsInt)
1419
- importedType = impl.SwiftContext .getUIntDecl ()->getDeclaredType ();
1419
+ importedType = impl.SwiftContext .getUIntDecl ()->getDeclaredInterfaceType ();
1420
1420
break ;
1421
1421
1422
1422
case ImportHint::CFPointer:
@@ -1647,7 +1647,7 @@ ImportedType ClangImporter::Implementation::importFunctionReturnType(
1647
1647
switch (getClangASTContext ().BuiltinInfo .getTypeString (builtinID)[0 ]) {
1648
1648
case ' z' : // size_t
1649
1649
case ' Y' : // ptrdiff_t
1650
- return {SwiftContext.getIntDecl ()->getDeclaredType (), false };
1650
+ return {SwiftContext.getIntDecl ()->getDeclaredInterfaceType (), false };
1651
1651
default :
1652
1652
break ;
1653
1653
}
@@ -2462,7 +2462,7 @@ Type ClangImporter::Implementation::getNSObjectType() {
2462
2462
return NSObjectTy;
2463
2463
2464
2464
if (auto decl = dyn_cast_or_null<ClassDecl>(importDeclByName (" NSObject" ))) {
2465
- NSObjectTy = decl->getDeclaredType ();
2465
+ NSObjectTy = decl->getDeclaredInterfaceType ();
2466
2466
return NSObjectTy;
2467
2467
}
2468
2468
@@ -2528,7 +2528,7 @@ static Type getNamedProtocolType(ClangImporter::Implementation &impl,
2528
2528
impl.importDecl (decl->getUnderlyingDecl (), impl.CurrentVersion )) {
2529
2529
if (auto protoDecl =
2530
2530
dynCastIgnoringCompatibilityAlias<ProtocolDecl>(swiftDecl)) {
2531
- return protoDecl->getDeclaredType ();
2531
+ return protoDecl->getDeclaredInterfaceType ();
2532
2532
}
2533
2533
}
2534
2534
}
0 commit comments