mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
llvm-pdbdump: If we don't change the color, don't reset the color.
The -output-color option was successful at suppressing color changes, but was still allowing color resets. Differential Revision: https://reviews.llvm.org/D31468 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d7f209a331
commit
ebe3d55fad
@ -83,12 +83,16 @@ bool LinePrinter::IsCompilandExcluded(llvm::StringRef CompilandName) {
|
||||
ExcludeCompilandFilters);
|
||||
}
|
||||
|
||||
WithColor::WithColor(LinePrinter &P, PDB_ColorItem C) : OS(P.OS) {
|
||||
if (P.hasColor())
|
||||
WithColor::WithColor(LinePrinter &P, PDB_ColorItem C)
|
||||
: OS(P.OS), UseColor(P.hasColor()) {
|
||||
if (UseColor)
|
||||
applyColor(C);
|
||||
}
|
||||
|
||||
WithColor::~WithColor() { OS.resetColor(); }
|
||||
WithColor::~WithColor() {
|
||||
if (UseColor)
|
||||
OS.resetColor();
|
||||
}
|
||||
|
||||
void WithColor::applyColor(PDB_ColorItem C) {
|
||||
switch (C) {
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
private:
|
||||
void applyColor(PDB_ColorItem C);
|
||||
raw_ostream &OS;
|
||||
bool UseColor;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user