[llvm] [X86] Use a range-based for loop (NFC) (PR #103519)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 20:27:37 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/103519
None
>From f4a22969e20465134006b7769b131068d5d41f25 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 13 Aug 2024 20:22:32 -0700
Subject: [PATCH] [X86] Use a range-based for loop (NFC)
---
llvm/lib/Target/X86/X86Subtarget.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 7d5af2ede99cf6..b563f6ebce34e9 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -283,8 +283,8 @@ void X86Subtarget::initSubtargetFeatures(StringRef CPU, StringRef TuneCPU,
SmallVector<StringRef, 9> FeaturesIn64BitOnly = {
"egpr", "push2pop2", "ppx", "ndd", "ccmp", "nf", "cf", "zu", "uintr"};
if (FullFS.find("-64bit-mode") != std::string::npos)
- llvm::for_each(FeaturesIn64BitOnly,
- [&](StringRef F) { FullFS += ",-" + F.str(); });
+ for (StringRef F : FeaturesIn64BitOnly)
+ FullFS += ",-" + F.str();
// Parse features string and set the CPU.
ParseSubtargetFeatures(CPU, TuneCPU, FullFS);
More information about the llvm-commits
mailing list