|
@@ -59,9 +59,12 @@ namespace {
|
|
|
|
|
|
bool TraverseDecl(Decl *D) {
|
|
|
if (D != NULL && filterMatches(D)) {
|
|
|
- Out.changeColor(llvm::raw_ostream::BLUE) <<
|
|
|
- (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n";
|
|
|
- Out.resetColor();
|
|
|
+ bool ShowColors = Out.has_colors();
|
|
|
+ if (ShowColors)
|
|
|
+ Out.changeColor(llvm::raw_ostream::BLUE);
|
|
|
+ Out << (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n";
|
|
|
+ if (ShowColors)
|
|
|
+ Out.resetColor();
|
|
|
if (Dump)
|
|
|
D->dump(Out);
|
|
|
else
|