[llvm] [CodeGen] Use range-based for loops (NFC) (PR #97187)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 19:57:59 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 2853a838d22b69f61ed376abbd9ab5e625111f44 409dd5f7b50adabe33d5fafe7698b65c300256af -- llvm/lib/CodeGen/MachineSSAUpdater.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/CodeGen/MachineSSAUpdater.cpp b/llvm/lib/CodeGen/MachineSSAUpdater.cpp
index 43c4b9c6c5..f3e5f4c038 100644
--- a/llvm/lib/CodeGen/MachineSSAUpdater.cpp
+++ b/llvm/lib/CodeGen/MachineSSAUpdater.cpp
@@ -196,7 +196,7 @@ Register MachineSSAUpdater::GetValueInMiddleOfBlock(MachineBasicBlock *BB,
       InsertNewDef(TargetOpcode::PHI, BB, Loc, RegAttrs, MRI, TII);
 
   // Fill in all the predecessors of the PHI.
-  for (const auto &[SrcBB, SrcReg]: PredValues)
+  for (const auto &[SrcBB, SrcReg] : PredValues)
     InsertedPHI.addReg(SrcReg).addMBB(SrcBB);
 
   // See if the PHI node can be merged to a single value.  This can happen in

``````````

</details>


https://github.com/llvm/llvm-project/pull/97187


More information about the llvm-commits mailing list