@@ -1381,7 +1381,7 @@ class ParameterTypeFlags {
13811381 NumBits = 3
13821382 };
13831383 OptionSet<ParameterFlags> value;
1384- static_assert (NumBits < 8 *sizeof (value ), " overflowed" );
1384+ static_assert (NumBits < 8 *sizeof (OptionSet<ParameterFlags> ), " overflowed" );
13851385
13861386 ParameterTypeFlags (OptionSet<ParameterFlags, uint8_t > val) : value(val) {}
13871387
@@ -2255,6 +2255,8 @@ inline bool canBeCalledIndirectly(SILFunctionTypeRepresentation rep) {
22552255 case SILFunctionTypeRepresentation::WitnessMethod:
22562256 return true ;
22572257 }
2258+
2259+ llvm_unreachable (" Unhandled SILFunctionTypeRepresentation in switch." );
22582260}
22592261
22602262// / Map a SIL function representation to the base language calling convention
@@ -2273,6 +2275,8 @@ getSILFunctionLanguage(SILFunctionTypeRepresentation rep) {
22732275 case SILFunctionTypeRepresentation::Closure:
22742276 return SILFunctionLanguage::Swift;
22752277 }
2278+
2279+ llvm_unreachable (" Unhandled SILFunctionTypeRepresentation in switch." );
22762280}
22772281
22782282// / AnyFunctionType - A function type has a single input and result, but
@@ -2357,6 +2361,8 @@ class AnyFunctionType : public TypeBase {
23572361 case SILFunctionTypeRepresentation::WitnessMethod:
23582362 return true ;
23592363 }
2364+
2365+ llvm_unreachable (" Unhandled SILFunctionTypeRepresentation in switch." );
23602366 }
23612367
23622368 // / True if the function representation carries context.
@@ -2373,6 +2379,8 @@ class AnyFunctionType : public TypeBase {
23732379 case SILFunctionTypeRepresentation::Closure:
23742380 return false ;
23752381 }
2382+
2383+ llvm_unreachable (" Unhandled SILFunctionTypeRepresentation in switch." );
23762384 }
23772385
23782386 // Note that we don't have setters. That is by design, use
@@ -3043,6 +3051,8 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
30433051 case Representation::WitnessMethod:
30443052 return true ;
30453053 }
3054+
3055+ llvm_unreachable (" Unhandled Representation in switch." );
30463056 }
30473057
30483058 bool hasGuaranteedSelfParam () const {
@@ -3058,6 +3068,8 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
30583068 case Representation::WitnessMethod:
30593069 return true ;
30603070 }
3071+
3072+ llvm_unreachable (" Unhandled Representation in switch." );
30613073 }
30623074
30633075 // / True if the function representation carries context.
@@ -3074,6 +3086,8 @@ class SILFunctionType final : public TypeBase, public llvm::FoldingSetNode,
30743086 case Representation::Closure:
30753087 return false ;
30763088 }
3089+
3090+ llvm_unreachable (" Unhandled Representation in switch." );
30773091 }
30783092
30793093 // Note that we don't have setters. That is by design, use
0 commit comments