[llvm] [DebugInfo] Use llvm::remove_if (NFC) (PR #149543)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jul 18 09:13:33 PDT 2025
    
    
  
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
We can pass a range to llvm::remove_if.
---
Full diff: https://github.com/llvm/llvm-project/pull/149543.diff
1 Files Affected:
- (modified) llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp (+1-1) 
``````````diff
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
index 93a567e89f774..64f1bfc015380 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
@@ -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();
``````````
</details>
https://github.com/llvm/llvm-project/pull/149543
    
    
More information about the llvm-commits
mailing list