@@ -1673,6 +1673,8 @@ namespace {
16731673 // All block types look like Builtin.UnknownObject.
16741674 return emitDirectMetadataRef (C.TheUnknownObjectType );
16751675 }
1676+
1677+ llvm_unreachable (" Not a valid SILFunctionType." );
16761678 }
16771679
16781680 llvm::Value *visitAnyMetatypeType (CanAnyMetatypeType type) {
@@ -1698,6 +1700,8 @@ namespace {
16981700 // FIXME: It'd be nice not to need a runtime call here.
16991701 return IGF.emitTypeMetadataRef (type);
17001702 }
1703+
1704+ llvm_unreachable (" Not a valid MetatypeRepresentation." );
17011705 }
17021706
17031707 // / Try to find the metatype in local data.
@@ -1852,6 +1856,8 @@ namespace {
18521856 // All block types look like Builtin.UnknownObject.
18531857 return emitFromValueWitnessTable (C.TheUnknownObjectType );
18541858 }
1859+
1860+ llvm_unreachable (" Not a valid SILFunctionType." );
18551861 }
18561862
18571863 llvm::Value *visitAnyMetatypeType (CanAnyMetatypeType type) {
@@ -1870,6 +1876,8 @@ namespace {
18701876 return emitFromValueWitnessTable (
18711877 CanMetatypeType::get (IGF.IGM .Context .TheNativeObjectType ));
18721878 }
1879+
1880+ llvm_unreachable (" Not a valid MetatypeRepresentation." );
18731881 }
18741882
18751883 llvm::Value *visitAnyClassType (ClassDecl *classDecl) {
@@ -1887,6 +1895,8 @@ namespace {
18871895 case ReferenceCounting::Error:
18881896 llvm_unreachable (" classes shouldn't have this kind of refcounting" );
18891897 }
1898+
1899+ llvm_unreachable (" Not a valid ReferenceCounting." );
18901900 }
18911901
18921902 llvm::Value *visitClassType (CanClassType type) {
@@ -4475,6 +4485,8 @@ static llvm::Value *emitLoadOfHeapMetadataRef(IRGenFunction &IGF,
44754485 return objcClass;
44764486 }
44774487 }
4488+
4489+ llvm_unreachable (" Not a valid IsaEncoding." );
44784490}
44794491
44804492// / Given an object of class type, produce the heap metadata reference
@@ -5559,6 +5571,8 @@ SpecialProtocol irgen::getSpecialProtocolID(ProtocolDecl *P) {
55595571 case KnownProtocolKind::ErrorCodeProtocol:
55605572 return SpecialProtocol::None;
55615573 }
5574+
5575+ llvm_unreachable (" Not a valid KnownProtocolKind." );
55625576}
55635577
55645578namespace {
0 commit comments