summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_report_decorator.h
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-02-26 09:06:59 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-02-26 09:06:59 +0000
commit882ed39389aa967c8a94ecb608b369a7de6ba73f (patch)
treed99c354b2fa33144c082c7da5141e459f04dc632 /lib/sanitizer_common/sanitizer_report_decorator.h
parent41ee246df392e0bb29aa62eeabca2193b83b31c6 (diff)
downloadcompiler-rt-882ed39389aa967c8a94ecb608b369a7de6ba73f.tar.gz
[sanitizer] Add a flag to enable/disable report colorization.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_report_decorator.h')
-rw-r--r--lib/sanitizer_common/sanitizer_report_decorator.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_report_decorator.h b/lib/sanitizer_common/sanitizer_report_decorator.h
index 2b6365fd1..6e5b0ed32 100644
--- a/lib/sanitizer_common/sanitizer_report_decorator.h
+++ b/lib/sanitizer_common/sanitizer_report_decorator.h
@@ -17,6 +17,8 @@
#ifndef SANITIZER_REPORT_DECORATOR_H
#define SANITIZER_REPORT_DECORATOR_H
+#include "sanitizer_common.h"
+
namespace __sanitizer {
class AnsiColorDecorator {
// FIXME: This is not portable. It assumes the special strings are printed to
@@ -40,7 +42,7 @@ class AnsiColorDecorator {
class SanitizerCommonDecorator: protected AnsiColorDecorator {
public:
SanitizerCommonDecorator()
- : __sanitizer::AnsiColorDecorator(PrintsToTtyCached()) { }
+ : __sanitizer::AnsiColorDecorator(ColorizeReports()) { }
const char *Warning() { return Red(); }
const char *EndWarning() { return Default(); }
};