diff --git a/lib/Target/X86/X86MCInstLower.cpp b/lib/Target/X86/X86MCInstLower.cpp index 8def738108d..d3933a79c0e 100644 --- a/lib/Target/X86/X86MCInstLower.cpp +++ b/lib/Target/X86/X86MCInstLower.cpp @@ -29,10 +29,10 @@ using namespace llvm; X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang, - X86AsmPrinter &asmprinter, - const TargetMachine &tm) -: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF), - TM(tm), MAI(*TM.getMCAsmInfo()) {} + const MachineFunction &mf, + X86AsmPrinter &asmprinter) +: Ctx(ctx), Mang(mang), MF(mf), TM(mf.getTarget()), MAI(*TM.getMCAsmInfo()), + AsmPrinter(asmprinter) {} MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const { return MF.getMMI().getObjFileInfo(); @@ -505,7 +505,7 @@ void X86MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *this, TM); + X86MCInstLower MCInstLowering(OutContext, Mang, *MF, *this); switch (MI->getOpcode()) { case TargetOpcode::DBG_VALUE: if (isVerbose() && OutStreamer.hasRawTextSupport()) { diff --git a/lib/Target/X86/X86MCInstLower.h b/lib/Target/X86/X86MCInstLower.h index 8bfa4c8aacc..a1b826d03db 100644 --- a/lib/Target/X86/X86MCInstLower.h +++ b/lib/Target/X86/X86MCInstLower.h @@ -30,13 +30,14 @@ namespace llvm { class LLVM_LIBRARY_VISIBILITY X86MCInstLower { MCContext &Ctx; Mangler *Mang; - X86AsmPrinter &AsmPrinter; const MachineFunction &MF; const TargetMachine &TM; const MCAsmInfo &MAI; + + X86AsmPrinter &AsmPrinter; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter, - const TargetMachine &TM); + X86MCInstLower(MCContext &ctx, Mangler *mang, const MachineFunction &MF, + X86AsmPrinter &asmprinter); void Lower(const MachineInstr *MI, MCInst &OutMI) const;