assert(0) -> LLVM_UNREACHABLE.
[oota-llvm.git] / include / llvm / Support / ErrorHandling.h
index c7e4297f00c835a8b3b17a1d632a87ddb03b2aee..1a401eb7c0df26b029cb48d70760b2995a9e001a 100644 (file)
@@ -46,11 +46,11 @@ namespace llvm {
   /// This function calls abort().
   /// Call this after assert(0), so that compiler knows the path is not
   /// reachable.
-  void llvm_unreachable(void) NORETURN;
+  void llvm_unreachable(const char *msg=0) NORETURN;
 }
 
 #ifndef NDEBUG
-#define LLVM_UNREACHABLE(msg) do {cerr<<msg<<"\n";llvm_unreachable();}while(0)
+#define LLVM_UNREACHABLE(msg) llvm_unreachable(msg)
 #else
 #define LLVM_UNREACHABLE(msg) llvm_unreachable()
 #endif