[lld] Enable ANSI escape code for Windows

Buffered diagnostics need ENABLE_VIRTUAL_TERMINAL_PROCESSING after D87272.
Do it unconditionally like FileCheck.
This commit is contained in:
Fangrui Song 2021-09-09 16:51:11 -07:00
parent 38a5bd4115
commit bcc34ab6c8

View File

@ -39,6 +39,7 @@
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PluginLoader.h"
#include "llvm/Support/Process.h"
#include <cstdlib>
using namespace lld;
@ -199,6 +200,7 @@ static unsigned inTestVerbosity() {
int main(int argc, const char **argv) {
InitLLVM x(argc, argv);
sys::Process::UseANSIEscapeCodes(true);
// Not running in lit tests, just take the shortest codepath with global
// exception handling and no memory cleanup on exit.