aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ErrorHandling.h
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-08 20:53:28 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-08 20:53:28 +0000
commitdac237e18209b697a8ba122d0ddd9cad4dfba1f8 (patch)
tree84addd27fd1610e6e8b5a9a82162914726abab4c /include/llvm/Support/ErrorHandling.h
parentd1fbd142945f5ef0c273c3d756431f8cb9d25ded (diff)
Implement changes from Chris's feedback.
Finish converting lib/Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ErrorHandling.h')
-rw-r--r--include/llvm/Support/ErrorHandling.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Support/ErrorHandling.h b/include/llvm/Support/ErrorHandling.h
index 758d9243c0..c7e4297f00 100644
--- a/include/llvm/Support/ErrorHandling.h
+++ b/include/llvm/Support/ErrorHandling.h
@@ -49,7 +49,11 @@ namespace llvm {
void llvm_unreachable(void) NORETURN;
}
-#define LLVM_UNREACHABLE(msg) do { assert(0 && msg); llvm_unreachable(); } while(0)
+#ifndef NDEBUG
+#define LLVM_UNREACHABLE(msg) do {cerr<<msg<<"\n";llvm_unreachable();}while(0)
+#else
+#define LLVM_UNREACHABLE(msg) llvm_unreachable()
+#endif
#endif