[NFC] Rename swift_runtime_unreachable to swift_unreachable and make it use LLVM's support when available.

This commit is contained in:
John McCall
2020-10-03 02:39:21 -04:00
parent 66a42d8de7
commit 0fb407943f
38 changed files with 112 additions and 73 deletions

View File

@@ -35,7 +35,7 @@
# define SWIFT_CASTING_SUPPORTS_MUTEX 1
# include "swift/Runtime/Mutex.h"
#endif
#include "swift/Runtime/Unreachable.h"
#include "swift/Basic/Unreachable.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerIntPair.h"
#if SWIFT_OBJC_INTEROP
@@ -1016,7 +1016,7 @@ static bool _dynamicCastToExistential(OpaqueValue *dest,
}
}
swift_runtime_unreachable("Unhandled ExistentialTypeRepresentation in switch.");
swift_unreachable("Unhandled ExistentialTypeRepresentation in switch.");
}
/******************************************************************************/
@@ -1214,7 +1214,7 @@ swift_dynamicCastMetatypeImpl(const Metadata *sourceType,
return nullptr;
}
swift_runtime_unreachable("Unhandled MetadataKind in switch.");
swift_unreachable("Unhandled MetadataKind in switch.");
}
static const Metadata *
@@ -1424,7 +1424,7 @@ static bool _dynamicCastToUnknownClassFromExistential(OpaqueValue *dest,
}
}
swift_runtime_unreachable(
swift_unreachable(
"Unhandled ExistentialTypeRepresentation in switch.");
}