[llvm-branch-commits] MachineInstrBuilder: Introduce copyMIMetadata() function. (PR #133535)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 28 15:37:31 PDT 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 edfde89401272e87710541aadc71bc018a03fc02 11cf57a23b653635a51df90da32a9459968cc4a9 --extensions cpp,h -- llvm/include/llvm/CodeGen/MachineInstrBuilder.h llvm/lib/CodeGen/TargetInstrInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h
index 576dc7ed3a..1d5d544b4e 100644
--- a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h
+++ b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h
@@ -391,9 +391,8 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,
MachineFunction &MF = *BB.getParent();
MachineInstr *MI = MF.CreateMachineInstr(MCID, MIMD.getDL());
BB.insert(I, MI);
- return MachineInstrBuilder(MF, MI)
- .copyMIMetadata(MIMD)
- .addReg(DestReg, RegState::Define);
+ return MachineInstrBuilder(MF, MI).copyMIMetadata(MIMD).addReg(
+ DestReg, RegState::Define);
}
/// This version of the builder inserts the newly-built instruction before
@@ -409,9 +408,8 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,
MachineFunction &MF = *BB.getParent();
MachineInstr *MI = MF.CreateMachineInstr(MCID, MIMD.getDL());
BB.insert(I, MI);
- return MachineInstrBuilder(MF, MI)
- .copyMIMetadata(MIMD)
- .addReg(DestReg, RegState::Define);
+ return MachineInstrBuilder(MF, MI).copyMIMetadata(MIMD).addReg(
+ DestReg, RegState::Define);
}
inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr &I,
@@ -441,8 +439,7 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,
MachineFunction &MF = *BB.getParent();
MachineInstr *MI = MF.CreateMachineInstr(MCID, MIMD.getDL());
BB.insert(I, MI);
- return MachineInstrBuilder(MF, MI)
- .copyMIMetadata(MIMD);
+ return MachineInstrBuilder(MF, MI).copyMIMetadata(MIMD);
}
inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,
@@ -452,8 +449,7 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,
MachineFunction &MF = *BB.getParent();
MachineInstr *MI = MF.CreateMachineInstr(MCID, MIMD.getDL());
BB.insert(I, MI);
- return MachineInstrBuilder(MF, MI)
- .copyMIMetadata(MIMD);
+ return MachineInstrBuilder(MF, MI).copyMIMetadata(MIMD);
}
inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr &I,
``````````
</details>
https://github.com/llvm/llvm-project/pull/133535
More information about the llvm-branch-commits
mailing list