[UBSan] Respect runtime flag for colorizing reports

llvm-svn: 210950
This commit is contained in:
Alexey Samsonov 2014-06-13 22:48:40 +00:00
parent 821a21ea30
commit 3e61c52352
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,6 @@ Location __ubsan::getCallerLocation(uptr CallerLoc) {
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 __sanitizer::AnsiColorDecorator &Decor,
}
Diag::~Diag() {
__sanitizer::AnsiColorDecorator Decor(PrintsToTty());
InitializeSanitizerCommon();
__sanitizer::AnsiColorDecorator Decor(ColorizeReports());
SpinMutexLock l(&CommonSanitizerReportMutex);
Printf(Decor.Bold());