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
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [P... Dmitry Antipov via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits
    • ... Sylvestre Ledru via Phabricator via cfe-commits
    • ... Alexandre Ganea via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits
    • ... Reid Kleckner via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits
    • ... Alexandre Ganea via Phabricator via cfe-commits
    • ... Reid Kleckner via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits
    • ... Alexandre Ganea via Phabricator via cfe-commits
    • ... Dmitry Antipov via Phabricator via cfe-commits

Reply via email to