llvm-project/lldb
Jonas Devlieghere 4429cf146e
[Support] Allow the ability to change WithColor's auto detection function
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
2022-02-28 20:30:06 -08:00
..
bindings Reland "[lldb/test] Fix TestProgressReporting.py race issue with the event listener" 2022-02-25 17:20:39 -08:00
cmake [lldb] Add support for a "global" lldbinit file 2022-02-18 12:30:22 +01:00
docs Platform gdb RSP packet doc fixes based on implementation behavior 2022-02-07 23:51:46 -08:00
examples [lldb/crashlog] Fix scripted_crashlog_json.test failure 2022-02-25 17:20:35 -08:00
include/lldb [lldb/host] Remove monitor_signals argument from process monitoring functions 2022-02-24 11:12:59 +01:00
packages/Python/lldbsuite [lldb] Fix race condition between lldb-vscode and stop hooks executor 2022-02-22 12:53:55 +01:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source Set error message if ValueObjectRegister fails to write back to register 2022-02-28 14:29:29 +08:00
test Set error message if ValueObjectRegister fails to write back to register 2022-02-28 14:29:29 +08:00
third_party/Python/module [lldb][NFC] Inclusive language: replace master/slave names for ptys 2021-11-12 10:54:18 -06:00
tools [Support] Allow the ability to change WithColor's auto detection function 2022-02-28 20:30:06 -08:00
unittests [lldb/host] Remove monitor_signals argument from process monitoring functions 2022-02-24 11:12:59 +01:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
CODE_OWNERS.txt [CODE OWNERS] Add wallace as code owner 2022-01-12 12:36:30 -08:00
LICENSE.TXT
use_lldb_suite_root.py