aaron.ballman added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:3220
 
-  unsigned LastPLSize = 0;
-  for (auto &I : Inputs) {
-    types::ID InputType = I.first;
-    const Arg *InputArg = I.second;
+  {
+    Arg *FinalPhaseArg;
----------------
Why do you need this compound statement?


================
Comment at: clang/lib/Driver/Types.cpp:313-315
+    for (auto Phase : PhaseList)
+      if (Phase <= phases::Preprocess)
+        P.push_back(Phase);
----------------
How about:

`llvm::copy_if(PhaseList, std::back_inserter(P), [](phases::ID Phase) { return 
Phase <= phases.Preprocess; });`

Similar below.


================
Comment at: clang/lib/Driver/Types.cpp:348-349
+    // Generally means, do every phase until Link.
+    for (auto Phase : PhaseList)
+      P.push_back(Phase);
+  }
----------------
`P = PhaseList;` ? Or does `P` come in with data already in it, in which case, 
`llvm::copy()` is a better choice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65993/new/

https://reviews.llvm.org/D65993



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to