[DebugInfo] Use llvm::remove_if (NFC) (#149543)

We can pass a range to llvm::remove_if.
This commit is contained in:
Kazu Hirata
2025-07-18 13:32:49 -07:00
committed by GitHub
parent 3c1a09d939
commit 36c78ec3c8

View File

@@ -263,7 +263,7 @@ bool LVScope::removeElement(LVElement *Element) {
return Item == Element;
};
auto RemoveElement = [Element, Predicate](auto &Container) -> bool {
auto Iter = std::remove_if(Container->begin(), Container->end(), Predicate);
auto Iter = llvm::remove_if(*Container, Predicate);
if (Iter != Container->end()) {
Container->erase(Iter, Container->end());
Element->resetParent();