diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-07-20 18:29:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-07-20 18:29:44 +0000 |
commit | c8b8c49d6f5d24232d7620f1551d19fb42d2f599 (patch) | |
tree | 0389bb8d8fa3ddf4ebdd20480e11f65e7d08d181 /llvm/lib/Support | |
parent | 04b4583c9baca0b5d501fd8bd10d7c08afd25a75 (diff) | |
download | bcm5719-llvm-c8b8c49d6f5d24232d7620f1551d19fb42d2f599.tar.gz bcm5719-llvm-c8b8c49d6f5d24232d7620f1551d19fb42d2f599.zip |
SourceMgr: Use has_colors() instead of just is_displayed() before trying to use
color.
llvm-svn: 160559
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 37a9d8f8274..e4e01be0380 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -243,8 +243,8 @@ SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN, void SMDiagnostic::print(const char *ProgName, raw_ostream &S, bool ShowColors) const { - // Display colors only if OS goes to a tty. - ShowColors &= S.is_displayed(); + // Display colors only if OS supports colors. + ShowColors &= S.has_colors(); if (ShowColors) S.changeColor(raw_ostream::SAVEDCOLOR, true); |