Skip to content

Commit 7f41095

Browse files
authored
[AArch64] Use helper class for emitting CFI instructions into MIR (NFCI) (#136004)
Pull Request: #136004
1 parent 2ce97fd commit 7f41095

File tree

4 files changed

+78
-178
lines changed

4 files changed

+78
-178
lines changed

Diff for: llvm/include/llvm/CodeGen/CFIInstBuilder.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class CFIInstBuilder {
6767
nullptr, TRI.getDwarfRegNum(Reg, IsEH)));
6868
}
6969

70-
void buildDefCFAOffset(int64_t Offset) const {
71-
insertCFIInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, Offset));
70+
void buildDefCFAOffset(int64_t Offset, MCSymbol *Label = nullptr) const {
71+
insertCFIInst(MCCFIInstruction::cfiDefCfaOffset(Label, Offset));
7272
}
7373

7474
void buildAdjustCFAOffset(int64_t Adjustment) const {
@@ -80,6 +80,14 @@ class CFIInstBuilder {
8080
nullptr, TRI.getDwarfRegNum(Reg, IsEH), Offset));
8181
}
8282

83+
void buildNegateRAState() const {
84+
insertCFIInst(MCCFIInstruction::createNegateRAState(nullptr));
85+
}
86+
87+
void buildNegateRAStateWithPC() const {
88+
insertCFIInst(MCCFIInstruction::createNegateRAStateWithPC(nullptr));
89+
}
90+
8391
void buildRegister(MCRegister Reg1, MCRegister Reg2) const {
8492
insertCFIInst(MCCFIInstruction::createRegister(
8593
nullptr, TRI.getDwarfRegNum(Reg1, IsEH),

0 commit comments

Comments
 (0)