From 5f4535b974e973d52797945fbf80f19ffba8c4ad Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 16 Jul 2013 14:04:08 +0000 Subject: [Support] Fix some warnings when self-hosting clang on Windows llvm-svn: 186413 --- llvm/lib/Support/ErrorHandling.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/Support/ErrorHandling.cpp') diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index f4b591e..9425445 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 } -- cgit v1.1