@@ -71,10 +71,8 @@ namespace {
71
71
// / The source type is 'void'.
72
72
Void,
73
73
74
- // / The source type is 'BOOL'.
75
- BOOL,
76
-
77
- // / The source type is 'Boolean'.
74
+ // / The source type is 'BOOL' or 'Boolean' -- a type mapped to Swift's
75
+ // / 'Bool'.
78
76
Boolean,
79
77
80
78
// / The source type is an Objective-C class type bridged to a Swift
@@ -129,7 +127,6 @@ namespace {
129
127
// See also ClangImporter.cpp's canImportAsOptional.
130
128
switch (hint) {
131
129
case ImportHint::None:
132
- case ImportHint::BOOL:
133
130
case ImportHint::Boolean:
134
131
case ImportHint::NSUInteger:
135
132
case ImportHint::Void:
@@ -685,7 +682,6 @@ namespace {
685
682
case ImportHint::SwiftNewtypeFromCFPointer:
686
683
return {mappedType, underlying.Hint };
687
684
688
- case ImportHint::BOOL:
689
685
case ImportHint::Boolean:
690
686
case ImportHint::NSUInteger:
691
687
// Toss out the special rules for these types; we still want to
@@ -715,7 +711,7 @@ namespace {
715
711
716
712
ImportHint hint = ImportHint::None;
717
713
if (type->getDecl ()->getName () == " BOOL" ) {
718
- hint = ImportHint::BOOL ;
714
+ hint = ImportHint::Boolean ;
719
715
} else if (type->getDecl ()->getName () == " Boolean" ) {
720
716
// FIXME: Darwin only?
721
717
hint = ImportHint::Boolean;
@@ -1381,8 +1377,8 @@ static ImportedType adjustTypeForConcreteImport(
1381
1377
1382
1378
// Turn BOOL and DarwinBoolean into Bool in contexts that can bridge types
1383
1379
// losslessly.
1384
- if (( hint == ImportHint::BOOL || hint == ImportHint::Boolean) &&
1385
- bridging == Bridgeability::Full && canBridgeTypes (importKind)) {
1380
+ if (hint == ImportHint::Boolean && bridging == Bridgeability::Full &&
1381
+ canBridgeTypes (importKind)) {
1386
1382
return {impl.SwiftContext .getBoolDecl ()->getDeclaredType (), false };
1387
1383
}
1388
1384
0 commit comments