Revert r367649: Improve raw_ostream so that you can "write" colors using operator<<

This reverts commit r367649 in an attempt to unbreak Windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rui Ueyama
2019-08-02 07:22:34 +00:00
parent 12fe6a4285
commit ed560ae76a
12 changed files with 39 additions and 89 deletions
+3 -4
View File
@@ -22,8 +22,6 @@ WithColor::WithColor(raw_ostream &OS, HighlightColor Color, bool DisableColors)
: OS(OS), DisableColors(DisableColors) {
// Detect color from terminal type unless the user passed the --color option.
if (colorsEnabled()) {
OS.enable_colors();
switch (Color) {
case HighlightColor::Address:
OS.changeColor(raw_ostream::YELLOW);
@@ -106,9 +104,10 @@ bool WithColor::colorsEnabled() {
return UseColor == cl::BOU_TRUE;
}
WithColor &WithColor::changeColor(raw_ostream::Color C, bool Bold, bool BG) {
WithColor &WithColor::changeColor(raw_ostream::Colors Color, bool Bold,
bool BG) {
if (colorsEnabled())
OS.changeColor(C, Bold, BG);
OS.changeColor(Color, Bold, BG);
return *this;
}