diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 98993b2146e..7d04e6b4d77 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1235,6 +1235,8 @@ void MachineInstr::print(raw_ostream &OS, bool IsStandalone, bool SkipOpers, if (const MachineFunction *MF = getMFIfAvailable(*this)) { F = &MF->getFunction(); M = F->getParent(); + if (!TII) + TII = MF->getSubtarget().getInstrInfo(); } ModuleSlotTracker MST(M); |