rnk added inline comments.
================
Comment at: clang/lib/Driver/Distro.cpp:205
+ const llvm::Triple &TargetOrHost) {
+ static Distro::DistroType Type = Distro::UninitializedDistro;
+
----------------
aganea wrote:
> I'm not sure if this is safe. @rnk Do we expect to call `GetDistro` with a
> different `VFS` or a different `Triple` when compiling with Clang? For GPU
> targets? Shouldn't we do this higher up, on the call site?
I think there is a plausible use case for a compile server that does two
compiles with different VFSs where you would get different distro detection
results. I think this should be a field on the `Driver` object instead of a
global variable.
I know LLD uses lots of globals, but that's not part of the clang design
philosophy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87187/new/
https://reviews.llvm.org/D87187
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits