[Mlir-commits] [mlir] b33c211 - [TableGen] Use llvm::erase_value (NFC)

Kazu Hirata llvmlistbot at llvm.org
Sat Oct 23 20:42:09 PDT 2021


Author: Kazu Hirata
Date: 2021-10-23T20:41:48-07:00
New Revision: b33c211804d17f88c103d6c05bdb84baf486c2bf

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

LOG: [TableGen] Use llvm::erase_value (NFC)

Added: 
    

Modified: 
    mlir/lib/TableGen/Dialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/TableGen/Dialect.cpp b/mlir/lib/TableGen/Dialect.cpp
index 7b5e89a7e6c98..ed775d236f112 100644
--- a/mlir/lib/TableGen/Dialect.cpp
+++ b/mlir/lib/TableGen/Dialect.cpp
@@ -32,7 +32,7 @@ StringRef Dialect::getCppNamespace() const {
 std::string Dialect::getCppClassName() const {
   // Simply use the name and remove any '_' tokens.
   std::string cppName = def->getName().str();
-  llvm::erase_if(cppName, [](char c) { return c == '_'; });
+  llvm::erase_value(cppName, '_');
   return cppName;
 }
 


        


More information about the Mlir-commits mailing list