<rdar://problem/13698402> Use raw_ostream::has_colors rather than is_displayed

to determine whether we should display colors.


Swift SVN r4832
This commit is contained in:
Doug Gregor
2013-04-20 06:55:12 +00:00
parent 298496c9e9
commit 6ad8dfd230
2 changed files with 3 additions and 3 deletions

View File

@@ -407,8 +407,8 @@ public:
REPLInput(REPLEnvironment &env)
: StackTrace(*this), Env(env), Autoindent(true)
{
// Only show colors if both stderr and stdout are displayed.
ShowColors = llvm::errs().is_displayed() && llvm::outs().is_displayed();
// Only show colors if both stderr and stdout have colors.
ShowColors = llvm::errs().has_colors() && llvm::outs().has_colors();
// Make sure the terminal color gets restored when the REPL is quit.
if (ShowColors)