runtime: add and switch to SWIFT_NOINLINE (NFC)

This switches the `LLVM_ATTRIBUTE_NOINLINE` to a local copy which is
namespaced in Swift.
This commit is contained in:
Saleem Abdulrasool
2020-05-06 08:27:26 -07:00
parent 923def217f
commit f465ec0345
6 changed files with 33 additions and 24 deletions

View File

@@ -248,11 +248,9 @@ swift::swift_getMangledTypeName(const Metadata *type) {
// This is noinline to preserve this frame in stack traces.
// We want "dynamicCastFailure" to appear in crash logs even we crash
// during the diagnostic because some Metadata is invalid.
LLVM_ATTRIBUTE_NORETURN
LLVM_ATTRIBUTE_NOINLINE
void
swift::swift_dynamicCastFailure(const void *sourceType, const char *sourceName,
const void *targetType, const char *targetName,
LLVM_ATTRIBUTE_NORETURN SWIFT_NOINLINE void
swift::swift_dynamicCastFailure(const void *sourceType, const char *sourceName,
const void *targetType, const char *targetName,
const char *message) {
swift::fatalError(/* flags = */ 0,
"Could not cast value of type '%s' (%p) to '%s' (%p)%s%s\n",