[Support] Add color cl category.

This commit adds a color category so tools can document this option and
enables it for dwarfdump and dsymuttil.

rdar://problem/40498996

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonas Devlieghere
2018-05-24 11:36:57 +00:00
parent 7f8728c26a
commit 2071b7a8b2
6 changed files with 13 additions and 4 deletions
+4 -2
View File
@@ -13,9 +13,11 @@
using namespace llvm;
cl::OptionCategory llvm::ColorCategory("Color Options");
static cl::opt<cl::boolOrDefault>
UseColor("color",
cl::desc("use colored syntax highlighting (default=autodetect)"),
UseColor("color", cl::cat(ColorCategory),
cl::desc("Use colors in output (default=autodetect)"),
cl::init(cl::BOU_UNSET));
bool WithColor::colorsEnabled(raw_ostream &OS) {