From 47fcd76474fc6b6c963ae4eeeeea15d465bd6a3c Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 23 Oct 2013 07:45:53 +0000 Subject: Hoist the addition of the prefix "SUMMARY: " from __sanitizer_report_error_summary to ReportErrorSummary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193231 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_common.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sanitizer_common/sanitizer_common.cc b/lib/sanitizer_common/sanitizer_common.cc index 5c61f771..efc976d1 100644 --- a/lib/sanitizer_common/sanitizer_common.cc +++ b/lib/sanitizer_common/sanitizer_common.cc @@ -168,7 +168,8 @@ void ReportErrorSummary(const char *error_type, const char *file, const int kMaxSize = 1024; // We don't want a summary too long. InternalScopedBuffer buff(kMaxSize); internal_snprintf( - buff.data(), kMaxSize, "%s: %s %s:%d %s", SanitizerToolName, error_type, + buff.data(), kMaxSize, "SUMMARY: %s: %s %s:%d %s", SanitizerToolName, + error_type, file ? StripPathPrefix(file, common_flags()->strip_path_prefix) : "??", line, function ? function : "??"); __sanitizer_report_error_summary(buff.data()); @@ -233,6 +234,6 @@ void NOINLINE __sanitizer_sandbox_on_notify(void *reserved) { } void __sanitizer_report_error_summary(const char *error_summary) { - Printf("SUMMARY: %s\n", error_summary); + Printf("%s\n", error_summary); } } // extern "C" -- cgit v1.2.3