[PATCH] D35310: [PM] Use range-based for loops in LegacyPassManager.cpp (NFC).

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 09:39:48 PDT 2017


mehdi_amini added inline comments.


================
Comment at: lib/IR/LegacyPassManager.cpp:641
+            if (ID == ID2)
+              continue;
+            Pass *AnalysisPass2 = findAnalysisPass(ID2);
----------------
Shouldn't this be a `break;`?


================
Comment at: lib/IR/LegacyPassManager.cpp:1255
+  for (Pass *P : PassVector)
+    delete P;
 }
----------------
Side note but: why don't we use `unique_ptr`? (always surprised when I see `delete` used)


https://reviews.llvm.org/D35310





More information about the llvm-commits mailing list