diff options
Diffstat (limited to 'include/llvm/Support/ErrorHandling.h')
-rw-r--r-- | include/llvm/Support/ErrorHandling.h | 6 |
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 |