[llvm] [SelectionDAG] Fix an incorrect DebugLoc on a COPY (PR #122963)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 12:32:56 PST 2025


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 0d150817c354bc61a48676754288aabbb03570c3 1cd822a9ab61c04db60fd6a37d3ddacab138a13b --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index a0f98b3d9b..333ec5e98b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -352,7 +352,8 @@ InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
         assert(OpRC && "Constraints cannot be fulfilled for allocation");
         Register NewVReg = MRI->createVirtualRegister(OpRC);
         BuildMI(*MBB, InsertPos, MIB->getDebugLoc(),
-                TII->get(TargetOpcode::COPY), NewVReg).addReg(VReg);
+                TII->get(TargetOpcode::COPY), NewVReg)
+            .addReg(VReg);
         VReg = NewVReg;
       } else {
         assert(ConstrainedRC->isAllocatable() &&

``````````

</details>


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


More information about the llvm-commits mailing list