[llvm] dc271b5 - [DebugInfo] Use llvm::erase_if (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 00:15:06 PDT 2023


Author: Kazu Hirata
Date: 2023-10-20T00:15:00-07:00
New Revision: dc271b59e967d1720c5cab50b81d04f91bc9cee8

URL: https://github.com/llvm/llvm-project/commit/dc271b59e967d1720c5cab50b81d04f91bc9cee8
DIFF: https://github.com/llvm/llvm-project/commit/dc271b59e967d1720c5cab50b81d04f91bc9cee8.diff

LOG: [DebugInfo] Use llvm::erase_if (NFC)

Added: 
    

Modified: 
    llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp
index cfe304eead512af..30ce937cda44042 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp
@@ -252,8 +252,7 @@ void LVElement::generateName(std::string &Prefix) const {
   Prefix.append(isLined() ? lineNumberAsString(/*ShowZero=*/true) : "?");
 
   // Remove any whitespaces.
-  Prefix.erase(std::remove_if(Prefix.begin(), Prefix.end(), ::isspace),
-               Prefix.end());
+  llvm::erase_if(Prefix, ::isspace);
 }
 
 // Generate a name for unnamed elements.


        


More information about the llvm-commits mailing list