diff options
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r-- | llvm/lib/Support/ErrorHandling.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index f4b591e777e..9425445a853 100644 --- a/llvm/lib/Support/ErrorHandling.cpp +++ b/llvm/lib/Support/ErrorHandling.cpp @@ -96,4 +96,9 @@ void llvm::llvm_unreachable_internal(const char *msg, const char *file, dbgs() << " at " << file << ":" << line; dbgs() << "!\n"; abort(); +#ifdef LLVM_BUILTIN_UNREACHABLE + // Windows systems and possibly others don't declare abort() to be noreturn, + // so use the unreachable builtin to avoid a Clang self-host warning. + LLVM_BUILTIN_UNREACHABLE; +#endif } |