[PATCH] D15077: [PATCH] Save and restore current term setting in terminalHasColors(). PR25007

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 01:49:56 PST 2015


joerg added a comment.

I see two issues with the current code and I think they should be considered as a whole for any chance here.

(1) We should only ever run this dance once. Even with clang we currently run it per source input.
(2) Since the dance is inherently not thread-safe, code using it as library, directly or indirectly, should have a way to either provide a fixed option OR to initialize the state at a safe point.

For (2), preserving the current state like in this patch is still a good idea, but it becomes less crucial.


http://reviews.llvm.org/D15077





More information about the llvm-commits mailing list