[PATCH] D143202: [llvm] Do not use Console API if output isn't a console device
Kacper Michajłow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 10:38:42 PST 2023
kasper93 added a comment.
Ok, so I recognize that this is global state and it is not very good to flip it like that.
Frankly this Console API usage in llvm is little bit messy it only sets color on STD_OUTPUT_HANDLE, what about STD_ERROR_HANDLE? Anyhow Microsoft documentation strongly suggests to use virtual terminal sequences. And I believe they are supported on all Windows versions that are still not EOL.
So how about removing this `static bool UseANSI = false;` and related code? I can do that, but since I already this review, I might as well ask you for opinion.
see https://learn.microsoft.com/en-us/windows/console/setconsoletextattribute
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143202/new/
https://reviews.llvm.org/D143202
More information about the llvm-commits
mailing list