[llvm] b4f3a96 - X86: Avoid using MachineFunction::getMMI
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 20 02:12:00 PDT 2024
Author: Matt Arsenault
Date: 2024-07-20T13:11:40+04:00
New Revision: b4f3a9662d308c869ac97e4f147edb38bc4f0626
URL: https://github.com/llvm/llvm-project/commit/b4f3a9662d308c869ac97e4f147edb38bc4f0626
DIFF: https://github.com/llvm/llvm-project/commit/b4f3a9662d308c869ac97e4f147edb38bc4f0626.diff
LOG: X86: Avoid using MachineFunction::getMMI
Added:
Modified:
llvm/lib/Target/X86/X86MCInstLower.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp
index df20ecd1b9b21..77ddd2366e629 100644
--- a/llvm/lib/Target/X86/X86MCInstLower.cpp
+++ b/llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -147,7 +147,7 @@ X86MCInstLower::X86MCInstLower(const MachineFunction &mf,
AsmPrinter(asmprinter) {}
MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const {
- return MF.getMMI().getObjFileInfo<MachineModuleInfoMachO>();
+ return AsmPrinter.MMI->getObjFileInfo<MachineModuleInfoMachO>();
}
/// GetSymbolFromOperand - Lower an MO_GlobalAddress or MO_ExternalSymbol
@@ -203,7 +203,7 @@ MCSymbol *X86MCInstLower::GetSymbolFromOperand(const MachineOperand &MO) const {
break;
case X86II::MO_COFFSTUB: {
MachineModuleInfoCOFF &MMICOFF =
- MF.getMMI().getObjFileInfo<MachineModuleInfoCOFF>();
+ AsmPrinter.MMI->getObjFileInfo<MachineModuleInfoCOFF>();
MachineModuleInfoImpl::StubValueTy &StubSym = MMICOFF.getGVStubEntry(Sym);
if (!StubSym.getPointer()) {
assert(MO.isGlobal() && "Extern symbol not handled yet");
More information about the llvm-commits
mailing list