[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 5 09:37:21 PDT 2018
zturner accepted this revision.
zturner added a comment.
lgtm after the one suggested change to the pre-processor conditional.
Comment at: source/Core/Debugger.cpp:815
+ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ DWORD consoleMode;
> teemperor wrote:
> > A comment here would be nice. E.g. `// Enabling use of ANSI color codes because LLDB is using them to highlight text.
> Alright, will do.
As a future cleanup we should probably add a function to LLVM called `AreAnsiEscapeCodesSupported()`. Then you could just write:
and get rid of the preprocessor comment. Don't need to do it in this patch though.
Comment at: source/Core/Debugger.cpp:809
+ // Enabling use of ANSI color codes because LLDB is using them to highlight
Can you also add `defined(_WIN32)` to this condition?
More information about the lldb-commits