rnk added a comment.
I think we can go forward with the reviewers we have. I have one more concern.
Are the other reviewers happy?
================
Comment at: clang/lib/Driver/Distro.cpp:206
+ const llvm::Triple &TargetOrHost) {
+ static Distro::DistroType Type = Distro::UninitializedDistro;
+
----------------
I guess I have one more concern: this code isn't thread safe. It's unlikely to
every be called from multiple threads, but let's use the safe code pattern
anyway. You can use lazy static local initialization like so:
static ... GetDistro(...) {
if (FS is Real FS && on Linux ...) {
static const Distro::DistroType hostDistro = computeRealDistro();
return hostDistro;
}
return computeDistroWithVFS();
}
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