[PATCH] D95915: [clang][driver] Only warn once about invalid -stdlib value

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 09:39:51 PST 2021


yaxunl added a comment.

In D95915#2539483 <https://reviews.llvm.org/D95915#2539483>, @jdoerfert wrote:

> I don't believe a static variable is a good idea. Also the name is not really informative. Members in `ToolChain` with a proper names would be nicer (IMHO).
>
> Tests missing. Also, now you don't warn for different missing runtimes, which seems odd.

+1

I agree with Johannes about static variable usage. We should avoid using static variables since they are not thread safe and become hurdles when we want to parallelize the driver.

Is it possible to emit the diag in a lambda and use std::call_once with it?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95915/new/

https://reviews.llvm.org/D95915



More information about the cfe-commits mailing list