[llvm] [X86] Use a range-based for loop (NFC) (PR #103519)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 20:28:09 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/103519.diff
1 Files Affected:
- (modified) llvm/lib/Target/X86/X86Subtarget.cpp (+2-2)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/103519
More information about the llvm-commits
mailing list