[compiler-rt] r188545 - [ASan/RTL] Disable colored reporting on Windows
Timur Iskhodzhanov
timurrrr at google.com
Fri Aug 16 04:26:26 PDT 2013
Author: timurrrr
Date: Fri Aug 16 06:26:26 2013
New Revision: 188545
URL: http://llvm.org/viewvc/llvm-project?rev=188545&view=rev
Log:
[ASan/RTL] Disable colored reporting on Windows
Modified:
compiler-rt/trunk/lib/asan/asan_report.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_report_decorator.h
Modified: compiler-rt/trunk/lib/asan/asan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=188545&r1=188544&r2=188545&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Fri Aug 16 06:26:26 2013
@@ -45,6 +45,11 @@ void AppendToErrorMessageBuffer(const ch
// ---------------------- Decorator ------------------------------ {{{1
bool PrintsToTtyCached() {
+ // FIXME: Add proper Windows support to AnsiColorDecorator and re-enable color
+ // printing on Windows.
+ if (SANITIZER_WINDOWS)
+ return 0;
+
static int cached = 0;
static bool prints_to_tty;
if (!cached) { // Ok wrt threads since we are printing only from one thread.
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_report_decorator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_report_decorator.h?rev=188545&r1=188544&r2=188545&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_report_decorator.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_report_decorator.h Fri Aug 16 06:26:26 2013
@@ -19,6 +19,8 @@
namespace __sanitizer {
class AnsiColorDecorator {
+ // FIXME: This is not portable. It assumes the special strings are printed to
+ // stdout, which is not the case on Windows (see SetConsoleTextAttribute()).
public:
explicit AnsiColorDecorator(bool use_ansi_colors) : ansi_(use_ansi_colors) { }
const char *Bold() const { return ansi_ ? "\033[1m" : ""; }
More information about the llvm-commits
mailing list