aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-10-17 13:50:29 -0700
committerKazu Hirata <kazu@google.com>2021-10-17 13:50:29 -0700
commitd245f2e8597bfb52c34810a328d42b990e4af1a4 (patch)
tree5387f89bbb0e696f24a533c44478b5087353bc1f /clang/lib/CodeGen/CodeGenModule.cpp
parentdc3382dc2c12bd48227361e7f32a37df418f9f5a (diff)
downloadllvm-d245f2e8597bfb52c34810a328d42b990e4af1a4.zip
llvm-d245f2e8597bfb52c34810a328d42b990e4af1a4.tar.gz
llvm-d245f2e8597bfb52c34810a328d42b990e4af1a4.tar.bz2
[clang] Use llvm::erase_if (NFC)
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 9fa5e9c..57454a5 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3417,10 +3417,9 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) {
Target.getCPUSpecificCPUDispatchFeatures(II->getName(), Features);
llvm::transform(Features, Features.begin(),
[](StringRef Str) { return Str.substr(1); });
- Features.erase(std::remove_if(
- Features.begin(), Features.end(), [&Target](StringRef Feat) {
- return !Target.validateCpuSupports(Feat);
- }), Features.end());
+ llvm::erase_if(Features, [&Target](StringRef Feat) {
+ return !Target.validateCpuSupports(Feat);
+ });
Options.emplace_back(cast<llvm::Function>(Func), StringRef{}, Features);
++Index;
}