File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -222,11 +222,12 @@ class PassManager : public PassInfoMixin<
222222 // / For internal use only!
223223 void eraseIf (function_ref<bool (StringRef)> Pred) {
224224 for (auto I = Passes.begin (); I != Passes.end ();) {
225- (*I)->eraseIf (Pred);
226- bool IsSpecial = (*I)->name ().ends_with (" PassAdaptor" ) ||
227- (*I)->name ().contains (" PassManager" );
228- bool PredResult = Pred ((*I)->name ());
229- if ((!IsSpecial && PredResult) || (IsSpecial && (*I)->isEmpty ()))
225+ auto &P = *I;
226+ P->eraseIf (Pred);
227+ bool IsSpecial = P->name ().ends_with (" PassAdaptor" ) ||
228+ P->name ().contains (" PassManager" );
229+ bool PredResult = Pred (P->name ());
230+ if ((!IsSpecial && PredResult) || (IsSpecial && P->isEmpty ()))
230231 I = Passes.erase (I);
231232 else
232233 ++I;
You can’t perform that action at this time.
0 commit comments