From 44a61bde15d456527156ee2080f0964344b939fe Mon Sep 17 00:00:00 2001 From: Nico Rieck Date: Wed, 11 Sep 2013 00:36:48 +0000 Subject: 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 --- include/llvm/Support/Process.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') 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. -- cgit v1.1