summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2024-07-19 22:09:05 +0400
committerGitHub <noreply@github.com>2024-07-19 22:09:05 +0400
commit0f0cfcff2ca65e295cd84d3eda6f8e93b76cb3a8 (patch)
tree0a4fec8c763053a185701237c0818ecee7e4435e /llvm/lib/CodeGen/MachineInstr.cpp
parent54dab7dfcfdffe7bd8697737fbd65fda8385d77e (diff)
CodeGen: Avoid some references to MachineFunction's getMMI (#99652)
MachineFunction's probably should not include a backreference to the owning MachineModuleInfo. Most of these references were used just to query the MCContext, which MachineFunction already directly stores. Other contexts are using it to query the LLVMContext, which can already be accessed through the IR function reference.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 2b083e1dc321..be64e9c8452f 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -2216,7 +2216,7 @@ void MachineInstr::emitError(StringRef Msg) const {
if (const MachineBasicBlock *MBB = getParent())
if (const MachineFunction *MF = MBB->getParent())
- return MF->getMMI().getModule()->getContext().emitError(LocCookie, Msg);
+ return MF->getFunction().getContext().emitError(LocCookie, Msg);
report_fatal_error(Msg);
}