diff options
author | Nico Rieck <nico.rieck@gmail.com> | 2013-09-11 00:36:48 +0000 |
---|---|---|
committer | Nico Rieck <nico.rieck@gmail.com> | 2013-09-11 00:36:48 +0000 |
commit | 44a61bde15d456527156ee2080f0964344b939fe (patch) | |
tree | c62e30e826059e609c06769baf2982ca7ce8b757 /include | |
parent | f495a2679248bca1a426052b3a297326bb46e9db (diff) | |
download | external_llvm-44a61bde15d456527156ee2080f0964344b939fe.zip external_llvm-44a61bde15d456527156ee2080f0964344b939fe.tar.gz external_llvm-44a61bde15d456527156ee2080f0964344b939fe.tar.bz2 |
Support ANSI escape code on Windows
In some cases (e.g. when a build system pipes stderr) the Windows console
API cannot be used to color output. For these, provide a way to switch to
ANSI escape codes. This is required for Clang's -fansi-escape-codes option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Process.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/Process.h b/include/llvm/Support/Process.h index 6d6add0..ce39d04 100644 --- a/include/llvm/Support/Process.h +++ b/include/llvm/Support/Process.h @@ -216,6 +216,12 @@ public: /// terminal, this function returns false. static bool StandardErrHasColors(); + /// Enables or disables whether ANSI escape sequences are used to output + /// colors. This only has an effect on Windows. + /// Note: Setting this option is not thread-safe and should only be done + /// during initialization. + static void UseANSIEscapeCodes(bool enable); + /// Whether changing colors requires the output to be flushed. /// This is needed on systems that don't support escape sequences for /// changing colors. |