[llvm] [IR] Use range-based for loops (NFC) (PR #97950)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 7 06:46:23 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 902fb1b4653d5a23613492406cd5693446f06ab6 7ee9f4c50e04ca16e1d3b8c024c95e01202562ac -- llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/Module.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 4eb2ca9bc3..c966c53d09 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -387,7 +387,7 @@ void Module::setModuleFlag(ModFlagBehavior Behavior, StringRef Key,
Metadata *Val) {
NamedMDNode *ModFlags = getOrInsertModuleFlagsMetadata();
// Replace the flag if it already exists.
- for (MDNode *Flag : ModFlags->operands()) {
+ for (MDNode *Flag : ModFlags->operands()) {
ModFlagBehavior MFB;
MDString *K = nullptr;
Metadata *V = nullptr;
``````````
</details>
https://github.com/llvm/llvm-project/pull/97950
More information about the llvm-commits
mailing list