rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land.
`llvm::call_once` is fine, but IMO the static local version is preferable: it's built in to the language, no headers to include. ================ Comment at: clang/lib/Driver/Distro.cpp:224 + if (onRealFS) { + static Distro::DistroType LinuxDistro = Distro::UninitializedDistro; + static llvm::once_flag DistroDetectFlag; ---------------- I think this would work and be simpler than call_once: static Distro::DistroType LinuxDistro = DetectDistro(llvm::vfs::getRealFileSystem()); I could be wrong. 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