dexonsmith added inline comments.
================ Comment at: clang/include/clang/Frontend/CompilerInvocation.h:199-203 void generateCC1CommandLine(llvm::SmallVectorImpl<const char *> &Args, StringAllocator SA) const; + void generateCC1CommandLine(llvm::SmallVectorImpl<const char *> &Args, + StringAllocator SA, + ArrayRef<llvm::opt::OptSpecifier> Included) const; ---------------- You can avoid the duplication at least for the WIP with: ``` void generateCC1CommandLine(llvm::SmallVectorImpl<const char *> &Args, StringAllocator SA, ArrayRef<llvm::opt::OptSpecifier> Included = None) const; ``` and then in the body: ``` auto IsIncluded = Included.empty() ? [](OptSpecifier) { return true; } : [&Included](OptSpecifier Opt) { return Included.count(Opt); }; // ... if (... && IsIncluded(Opt)) { ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94474/new/ https://reviews.llvm.org/D94474 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits