pass around MF, not MMI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-07-20 22:26:07 +00:00
parent 4f1be4abba
commit 0c13cf36ad
2 changed files with 5 additions and 5 deletions

View File

@ -30,17 +30,17 @@ using namespace llvm;
X86MCInstLower::X86MCInstLower(MCContext &ctx, Mangler *mang,
X86AsmPrinter &asmprinter)
: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MMI(AsmPrinter.MMI) {}
: Ctx(ctx), Mang(mang), AsmPrinter(asmprinter), MF(*AsmPrinter.MF) {}
MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const {
return MMI->getObjFileInfo<MachineModuleInfoMachO>();
return MF.getMMI().getObjFileInfo<MachineModuleInfoMachO>();
}
MCSymbol *X86MCInstLower::GetPICBaseSymbol() const {
const TargetLowering *TLI = AsmPrinter.TM.getTargetLowering();
return static_cast<const X86TargetLowering*>(TLI)->
getPICBaseSymbol(AsmPrinter.MF, Ctx);
getPICBaseSymbol(&MF, Ctx);
}
/// GetSymbolFromOperand - Lower an MO_GlobalAddress or MO_ExternalSymbol

View File

@ -18,7 +18,7 @@ namespace llvm {
class MCOperand;
class MCSymbol;
class MachineInstr;
class MachineModuleInfo;
class MachineFunction;
class MachineModuleInfoMachO;
class MachineOperand;
class Mangler;
@ -29,7 +29,7 @@ class LLVM_LIBRARY_VISIBILITY X86MCInstLower {
MCContext &Ctx;
Mangler *Mang;
X86AsmPrinter &AsmPrinter;
MachineModuleInfo *MMI;
const MachineFunction &MF;
public:
X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter);