@@ -140,6 +140,8 @@ namespace {
140140 case ImportHint::SwiftNewtypeFromCFPointer:
141141 return true ;
142142 }
143+
144+ llvm_unreachable (" Invalid ImportHint." );
143145 }
144146
145147 struct ImportResult {
@@ -173,6 +175,8 @@ namespace {
173175 return OptionalType::get (payloadType);
174176 return ImplicitlyUnwrappedOptionalType::get (payloadType);
175177 }
178+
179+ llvm_unreachable (" Invalid OptionalTypeKind." );
176180 }
177181
178182 class SwiftTypeConverter :
@@ -296,6 +300,8 @@ namespace {
296300 case clang::BuiltinType::OMPArraySection:
297301 return Type ();
298302 }
303+
304+ llvm_unreachable (" Invalid BuiltinType." );
299305 }
300306
301307 ImportResult VisitComplexType (const clang::ComplexType *type) {
@@ -783,6 +789,8 @@ namespace {
783789 return getAdjustedTypeDeclReferenceType (decl);
784790 }
785791 }
792+
793+ llvm_unreachable (" Invalid EnumKind." );
786794 }
787795
788796 ImportResult VisitObjCObjectType (const clang::ObjCObjectType *type) {
@@ -1051,6 +1059,8 @@ static bool canBridgeTypes(ImportTypeKind importKind) {
10511059 case ImportTypeKind::BridgedValue:
10521060 return true ;
10531061 }
1062+
1063+ llvm_unreachable (" Invalid ImportTypeKind." );
10541064}
10551065
10561066// / True if the type has known CoreFoundation reference counting semantics.
@@ -1075,6 +1085,8 @@ static bool isCFAudited(ImportTypeKind importKind) {
10751085 case ImportTypeKind::PropertyWithReferenceSemantics:
10761086 return true ;
10771087 }
1088+
1089+ llvm_unreachable (" Invalid ImportTypeKind." );
10781090}
10791091
10801092// / Turn T into Unmanaged<T>.
@@ -1744,6 +1756,8 @@ adjustResultTypeForThrowingFunction(const ImportedErrorInfo &errorInfo,
17441756 case ForeignErrorConvention::NonNilError:
17451757 return resultTy;
17461758 }
1759+
1760+ llvm_unreachable (" Invalid ForeignErrorConvention." );
17471761}
17481762
17491763// / Produce the foreign error convention from the imported error info,
0 commit comments