File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -190,9 +190,8 @@ class PreservedAnalyses {
190190 PreservedIDs.erase (ID);
191191 NotPreservedAnalysisIDs.insert (ID);
192192 }
193- for (auto *ID : PreservedIDs)
194- if (!Arg.PreservedIDs .count (ID))
195- PreservedIDs.erase (ID);
193+ PreservedIDs.remove_if (
194+ [&](void *ID) { return !Arg.PreservedIDs .contains (ID); });
196195 }
197196
198197 // / Intersect this set with a temporary other set in place.
@@ -212,9 +211,8 @@ class PreservedAnalyses {
212211 PreservedIDs.erase (ID);
213212 NotPreservedAnalysisIDs.insert (ID);
214213 }
215- for (auto *ID : PreservedIDs)
216- if (!Arg.PreservedIDs .count (ID))
217- PreservedIDs.erase (ID);
214+ PreservedIDs.remove_if (
215+ [&](void *ID) { return !Arg.PreservedIDs .contains (ID); });
218216 }
219217
220218 // / A checker object that makes it easy to query for whether an analysis or
@@ -316,4 +314,4 @@ class PreservedAnalyses {
316314};
317315} // namespace llvm
318316
319- #endif
317+ #endif
You can’t perform that action at this time.
0 commit comments