Skip to content

Commit a8a7d62

Browse files
committed
AArch64: Avoid using MachineFunction::getMMI
1 parent 155f6b4 commit a8a7d62

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,8 +1728,7 @@ void AArch64AsmPrinter::LowerLOADauthptrstatic(const MachineInstr &MI) {
17281728
assert(GAOp.getOffset() == 0 &&
17291729
"non-zero offset for $auth_ptr$ stub slots is not supported");
17301730
const MCSymbol *GASym = TM.getSymbol(GAOp.getGlobal());
1731-
AuthPtrStubSym =
1732-
TLOF.getAuthPtrSlotSymbol(TM, &MF->getMMI(), GASym, Key, Disc);
1731+
AuthPtrStubSym = TLOF.getAuthPtrSlotSymbol(TM, MMI, GASym, Key, Disc);
17331732
} else {
17341733
assert(TM.getTargetTriple().isOSBinFormatMachO() &&
17351734
"LOADauthptrstatic is implemented only for MachO/ELF");
@@ -1740,8 +1739,7 @@ void AArch64AsmPrinter::LowerLOADauthptrstatic(const MachineInstr &MI) {
17401739
assert(GAOp.getOffset() == 0 &&
17411740
"non-zero offset for $auth_ptr$ stub slots is not supported");
17421741
const MCSymbol *GASym = TM.getSymbol(GAOp.getGlobal());
1743-
AuthPtrStubSym =
1744-
TLOF.getAuthPtrSlotSymbol(TM, &MF->getMMI(), GASym, Key, Disc);
1742+
AuthPtrStubSym = TLOF.getAuthPtrSlotSymbol(TM, MMI, GASym, Key, Disc);
17451743
}
17461744

17471745
MachineOperand StubMOHi =

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,6 @@ void AArch64FrameLowering::emitPrologue(MachineFunction &MF,
17141714
const AArch64RegisterInfo *RegInfo = Subtarget.getRegisterInfo();
17151715
const TargetInstrInfo *TII = Subtarget.getInstrInfo();
17161716

1717-
MachineModuleInfo &MMI = MF.getMMI();
17181717
AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
17191718
bool EmitCFI = AFI->needsDwarfUnwindInfo(MF);
17201719
bool EmitAsyncCFI = AFI->needsAsyncDwarfUnwindInfo(MF);
@@ -1882,7 +1881,7 @@ void AArch64FrameLowering::emitPrologue(MachineFunction &MF,
18821881
MachineInstr::FrameSetup, false, NeedsWinCFI, &HasWinCFI);
18831882
if (EmitCFI) {
18841883
// Label used to tie together the PROLOG_LABEL and the MachineMoves.
1885-
MCSymbol *FrameLabel = MMI.getContext().createTempSymbol();
1884+
MCSymbol *FrameLabel = MF.getContext().createTempSymbol();
18861885
// Encode the stack size of the leaf function.
18871886
unsigned CFIIndex = MF.addFrameInst(
18881887
MCCFIInstruction::cfiDefCfaOffset(FrameLabel, NumBytes));

0 commit comments

Comments
 (0)