[PATCH] D35310: [PM] Use range-based for loops in LegacyPassManager.cpp (NFC).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 09:45:18 PDT 2017
fhahn added inline comments.
================
Comment at: lib/IR/LegacyPassManager.cpp:641
+ if (ID == ID2)
+ continue;
+ Pass *AnalysisPass2 = findAnalysisPass(ID2);
----------------
mehdi_amini wrote:
> Shouldn't this be a `break;`?
Ah yes!
================
Comment at: lib/IR/LegacyPassManager.cpp:1255
+ for (Pass *P : PassVector)
+ delete P;
}
----------------
mehdi_amini wrote:
> Side note but: why don't we use `unique_ptr`? (always surprised when I see `delete` used)
I can check how much effort using unique_ptr would be and will submit a separate patch if it's feasible.
https://reviews.llvm.org/D35310
More information about the llvm-commits
mailing list