Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

We can pass a range to llvm::remove_if.

We can pass a range to llvm::remove_if.
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2025

@llvm/pr-subscribers-debuginfo

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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();

@kazutakahirata kazutakahirata merged commit 36c78ec into llvm:main Jul 18, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250718_llvm_remove_if branch July 18, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants