[compiler-rt] r210950 - [UBSan] Respect runtime flag for colorizing reports
Alexey Samsonov
vonosmas at gmail.com
Fri Jun 13 15:48:40 PDT 2014
Author: samsonov
Date: Fri Jun 13 17:48:40 2014
New Revision: 210950
URL: http://llvm.org/viewvc/llvm-project?rev=210950&view=rev
Log:
[UBSan] Respect runtime flag for colorizing reports
Modified:
compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
Modified: compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_diag.cc?rev=210950&r1=210949&r2=210950&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag.cc Fri Jun 13 17:48:40 2014
@@ -49,7 +49,6 @@ Location __ubsan::getCallerLocation(uptr
Location __ubsan::getFunctionLocation(uptr Loc, const char **FName) {
if (!Loc)
return Location();
- // FIXME: We may need to run initialization earlier.
InitializeSanitizerCommon();
AddressInfo Info;
@@ -265,7 +264,8 @@ static void renderMemorySnippet(const __
}
Diag::~Diag() {
- __sanitizer::AnsiColorDecorator Decor(PrintsToTty());
+ InitializeSanitizerCommon();
+ __sanitizer::AnsiColorDecorator Decor(ColorizeReports());
SpinMutexLock l(&CommonSanitizerReportMutex);
Printf(Decor.Bold());
More information about the llvm-commits
mailing list