@@ -2303,7 +2303,7 @@ namespace {
2303
2303
SwiftType = Impl.importType (ClangType,
2304
2304
ImportTypeKind::Typedef,
2305
2305
isInSystemModule (DC),
2306
- ClangType-> isBlockPointerType ( ),
2306
+ getTypedefBridgeability (ClangType ),
2307
2307
OTK_Optional);
2308
2308
}
2309
2309
@@ -2410,7 +2410,7 @@ namespace {
2410
2410
auto underlyingType = Impl.importType (decl->getIntegerType (),
2411
2411
ImportTypeKind::Enum,
2412
2412
isInSystemModule (dc),
2413
- /* isFullyBridgeable */ false );
2413
+ Bridgeability::None );
2414
2414
if (!underlyingType)
2415
2415
return nullptr ;
2416
2416
@@ -2447,7 +2447,7 @@ namespace {
2447
2447
// Compute the underlying type.
2448
2448
auto underlyingType = Impl.importType (
2449
2449
decl->getIntegerType (), ImportTypeKind::Enum, isInSystemModule (dc),
2450
- /* isFullyBridgeable */ false );
2450
+ Bridgeability::None );
2451
2451
if (!underlyingType)
2452
2452
return nullptr ;
2453
2453
@@ -3063,7 +3063,7 @@ namespace {
3063
3063
auto type = Impl.importType (clangContext.getTagDeclType (clangEnum),
3064
3064
ImportTypeKind::Value,
3065
3065
isInSystemModule (dc),
3066
- /* isFullyBridgeable */ false );
3066
+ Bridgeability::None );
3067
3067
if (!type)
3068
3068
return nullptr ;
3069
3069
// FIXME: Importing the type will recursively revisit this same
@@ -3101,7 +3101,7 @@ namespace {
3101
3101
Impl.getClangASTContext ().getTagDeclType (clangEnum),
3102
3102
ImportTypeKind::Value,
3103
3103
isInSystemModule (dc),
3104
- /* isFullyBridgeable */ false );
3104
+ Bridgeability::None );
3105
3105
if (!enumType)
3106
3106
return nullptr ;
3107
3107
@@ -3162,7 +3162,7 @@ namespace {
3162
3162
auto type = Impl.importType (decl->getType (),
3163
3163
ImportTypeKind::Variable,
3164
3164
isInSystemModule (dc),
3165
- /* isFullyBridgeable */ false );
3165
+ Bridgeability::None );
3166
3166
if (!type)
3167
3167
return nullptr ;
3168
3168
@@ -3385,7 +3385,7 @@ namespace {
3385
3385
auto type = Impl.importType (decl->getType (),
3386
3386
ImportTypeKind::RecordField,
3387
3387
isInSystemModule (dc),
3388
- /* isFullyBridgeable */ false );
3388
+ Bridgeability::None );
3389
3389
if (!type)
3390
3390
return nullptr ;
3391
3391
@@ -3454,7 +3454,7 @@ namespace {
3454
3454
(isAudited ? ImportTypeKind::AuditedVariable
3455
3455
: ImportTypeKind::Variable),
3456
3456
isInSystemModule (dc),
3457
- /* isFullyBridgeable */ false );
3457
+ Bridgeability::None );
3458
3458
3459
3459
if (!type)
3460
3460
return nullptr ;
@@ -4332,7 +4332,7 @@ namespace {
4332
4332
superclassType = Impl.importType (clangSuperclassType,
4333
4333
ImportTypeKind::Abstract,
4334
4334
isInSystemModule (dc),
4335
- /* isFullyBridgeable */ false );
4335
+ Bridgeability::None );
4336
4336
if (superclassType) {
4337
4337
assert (superclassType->is <ClassType>() ||
4338
4338
superclassType->is <BoundGenericClassType>());
@@ -4938,7 +4938,7 @@ SwiftDeclConverter::importSwiftNewtype(const clang::TypedefNameDecl *decl,
4938
4938
// Import the type of the underlying storage
4939
4939
auto storedUnderlyingType = Impl.importType (
4940
4940
decl->getUnderlyingType (), ImportTypeKind::Value, isInSystemModule (dc),
4941
- decl-> getUnderlyingType ()-> isBlockPointerType () , OTK_None);
4941
+ Bridgeability::None , OTK_None);
4942
4942
4943
4943
if (auto objTy = storedUnderlyingType->getAnyOptionalObjectType ())
4944
4944
storedUnderlyingType = objTy;
@@ -4956,7 +4956,7 @@ SwiftDeclConverter::importSwiftNewtype(const clang::TypedefNameDecl *decl,
4956
4956
// Find a bridged type, which may be different
4957
4957
auto computedPropertyUnderlyingType = Impl.importType (
4958
4958
decl->getUnderlyingType (), ImportTypeKind::Property, isInSystemModule (dc),
4959
- decl-> getUnderlyingType ()-> isBlockPointerType () , OTK_None);
4959
+ Bridgeability::Full , OTK_None);
4960
4960
if (auto objTy = computedPropertyUnderlyingType->getAnyOptionalObjectType ())
4961
4961
computedPropertyUnderlyingType = objTy;
4962
4962
@@ -5173,7 +5173,7 @@ SwiftDeclConverter::importAsOptionSetType(DeclContext *dc, Identifier name,
5173
5173
// Compute the underlying type.
5174
5174
auto underlyingType = Impl.importType (
5175
5175
decl->getIntegerType (), ImportTypeKind::Enum, isInSystemModule (dc),
5176
- /* isFullyBridgeable */ false );
5176
+ Bridgeability::None );
5177
5177
if (!underlyingType)
5178
5178
return nullptr ;
5179
5179
@@ -5492,7 +5492,7 @@ SwiftDeclConverter::getImplicitProperty(ImportedName importedName,
5492
5492
Type swiftPropertyType = Impl.importType (
5493
5493
propertyType, ImportTypeKind::Property,
5494
5494
Impl.shouldAllowNSUIntegerAsInt (isFromSystemModule, getter),
5495
- /* isFullyBridgeable */ true , OTK_ImplicitlyUnwrappedOptional);
5495
+ Bridgeability::Full , OTK_ImplicitlyUnwrappedOptional);
5496
5496
if (!swiftPropertyType)
5497
5497
return nullptr ;
5498
5498
@@ -6406,7 +6406,8 @@ Optional<GenericParamList *> SwiftDeclConverter::importObjCGenericParams(
6406
6406
clangBound->stripObjCKindOfTypeAndQuals (Impl.getClangASTContext ());
6407
6407
Type superclassType =
6408
6408
Impl.importType (clang::QualType (unqualifiedClangBound, 0 ),
6409
- ImportTypeKind::Abstract, false , false );
6409
+ ImportTypeKind::Abstract, false ,
6410
+ Bridgeability::None);
6410
6411
if (!superclassType) {
6411
6412
return None;
6412
6413
}
0 commit comments