[Sanitizer] Use common CHECK machinery. Currently each tool has to define its own CheckFailed function.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158075 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc
index 301e349..8d156c0 100644
--- a/lib/asan/asan_rtl.cc
+++ b/lib/asan/asan_rtl.cc
@@ -45,6 +45,13 @@
Exit(FLAG_exitcode);
}
+void CheckFailed(const char *file, int line, const char *cond, u64 v1, u64 v2) {
+ AsanReport("AddressSanitizer CHECK failed: %s:%d \"%s\" (%zx, %zx)\n",
+ file, line, cond, (uptr)v1, (uptr)v2);
+ PRINT_CURRENT_STACK();
+ ShowStatsAndAbort();
+}
+
} // namespace __sanitizer
namespace __asan {
@@ -336,12 +343,6 @@
__asan_print_accumulated_stats();
}
-void CheckFailed(const char *cond, const char *file, int line) {
- Report("CHECK failed: %s at %s:%d\n", cond, file, line);
- PRINT_CURRENT_STACK();
- ShowStatsAndAbort();
-}
-
} // namespace __asan
// ---------------------- Interface ---------------- {{{1