aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/ErrorHandling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/ErrorHandling.cpp')
-rw-r--r--lib/Support/ErrorHandling.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp
index f4b591e..9425445 100644
--- a/lib/Support/ErrorHandling.cpp
+++ b/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
}