@@ -1291,28 +1291,8 @@ static Type adjustTypeForConcreteImport(ClangImporter::Implementation &impl,
1291
1291
1292
1292
// SwiftTypeConverter turns block pointers into @convention(block) types.
1293
1293
// In a bridgeable context, or in the direct structure of a typedef,
1294
- // we would prefer to instead use the default Swift convention. But this
1295
- // does means that, when we're using a typedef of a block pointer type in
1296
- // an unbridgable context, we need to go back and do a fully-unbridged
1297
- // import of the underlying type.
1294
+ // we would prefer to instead use the default Swift convention.
1298
1295
if (hint == ImportHint::Block) {
1299
- if (bridging == Bridgeability::None) {
1300
- if (auto typedefType = clangType->getAs <clang::TypedefType>()) {
1301
- // In non-bridged contexts, drop the typealias sugar for blocks.
1302
- // FIXME: This will do the wrong thing if there's any adjustment to do
1303
- // besides optionality.
1304
- Type underlyingTy = impl.importType (typedefType->desugar (),
1305
- importKind,
1306
- allowNSUIntegerAsInt,
1307
- bridging,
1308
- OTK_None);
1309
- if (Type unwrappedTy = underlyingTy->getAnyOptionalObjectType ())
1310
- underlyingTy = unwrappedTy;
1311
- if (!underlyingTy->isEqual (importedType))
1312
- importedType = underlyingTy;
1313
- }
1314
- }
1315
-
1316
1296
if (canBridgeTypes (importKind) || importKind == ImportTypeKind::Typedef) {
1317
1297
auto fTy = importedType->castTo <FunctionType>();
1318
1298
FunctionType::ExtInfo einfo = fTy ->getExtInfo ();
0 commit comments