aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2014-02-26 08:39:24 -0800
committerDan Gohman <sunfish@mozilla.com>2014-02-28 11:22:37 -0800
commitafc95002f260faae520e91fa681cedf8485b4613 (patch)
tree822242f9750db6c9d30d5d14341360b3c3e98a9d
parenteaddc5d650f87a861ebdc6d3c49fb155ec791306 (diff)
Use more LLVM-idiomatic error reporting.
-rw-r--r--lib/Transforms/NaCl/LowerEmExceptionsPass.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp b/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
index 2e3f0924cc..ac07530ab8 100644
--- a/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
+++ b/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
@@ -45,20 +45,10 @@
#include <vector>
#include <set>
-#include "llvm/Support/raw_ostream.h"
-#include <stdio.h>
-#define dump(x) fprintf(stderr, x "\n")
-#define dumpv(x, ...) fprintf(stderr, x "\n", __VA_ARGS__)
-#define dumpfail(x) { fprintf(stderr, x "\n"); fprintf(stderr, "%s : %d\n", __FILE__, __LINE__); report_fatal_error("fail"); }
-#define dumpfailv(x, ...) { fprintf(stderr, x "\n", __VA_ARGS__); fprintf(stderr, "%s : %d\n", __FILE__, __LINE__); report_fatal_error("fail"); }
-#define dumpIR(value) { \
- std::string temp; \
- raw_string_ostream stream(temp); \
- stream << *(value); \
- fprintf(stderr, "%s\n", temp.c_str()); \
-}
+#ifdef NDEBUG
#undef assert
-#define assert(x) { if (!(x)) dumpfail(#x); }
+#define assert(x) { if (!(x)) report_fatal_error(#x); }
+#endif
using namespace llvm;