forked from OSchip/llvm-project
4429cf146e
WithColor has an "auto detection mode" which looks whether the corresponding whether the corresponding cl::opt is enabled or not. While this is great when opting into cl::opt, it's not so great for downstream users of this utility, which might have their own competing options to enable or disable colors. The WithColor constructor takes a color mode, but the big benefit of the class are its static error and warning helpers and default error handlers. In order to allow users of this utility to enable or disable colors globally, this patch adds the ability to specify a global auto detection function. By default, the auto detection function behaves the way that it does today. The benefit of this patch lies in that it can be overwritten. In addition to a ability to change the auto detection function, I've also made it possible to get your hands on the default auto detection function, so you swap it back if if you so desire. This patch allow downstream users (like LLDB) to globally disable colors with its own command line flag. Differential revision: https://reviews.llvm.org/D120593 |
||
---|---|---|
.. | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include/lldb | ||
packages/Python/lldbsuite | ||
resources | ||
scripts | ||
source | ||
test | ||
third_party/Python/module | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.txt | ||
LICENSE.TXT | ||
use_lldb_suite_root.py |