projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac114d2
)
Simplify switch statement (NFC)
author
Adrian Prantl
<aprantl@apple.com>
Mon, 12 Feb 2018 22:09:57 +0000
(22:09 +0000)
committer
Adrian Prantl
<aprantl@apple.com>
Mon, 12 Feb 2018 22:09:57 +0000
(22:09 +0000)
llvm-svn: 324945
llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp
b/llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp
index
46c19bc
..
f60f962
100644
(file)
--- a/
llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp
+++ b/
llvm/lib/DebugInfo/DWARF/SyntaxHighlighting.cpp
@@
-21,11
+21,9
@@
static cl::opt<cl::boolOrDefault>
cl::init(cl::BOU_UNSET));
bool WithColor::colorsEnabled(raw_ostream &OS) {
- switch (UseColor) {
- case cl::BOU_UNSET: return OS.has_colors();
- case cl::BOU_TRUE: return true;
- case cl::BOU_FALSE: return false;
- }
+ if (UseColor == cl::BOU_UNSET)
+ return OS.has_colors();
+ return UseColor == cl::BOU_TRUE;
}
WithColor::WithColor(raw_ostream &OS, enum HighlightColor Type) : OS(OS) {