forked from OSchip/llvm-project
[UBSan] Respect runtime flag for colorizing reports
llvm-svn: 210950
This commit is contained in:
parent
821a21ea30
commit
3e61c52352
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue