void X86AsmPrinter::PrintPICBaseSymbol(raw_ostream &O) const {
const TargetLowering *TLI = TM.getTargetLowering();
- O << *static_cast<const X86TargetLowering*>(TLI)->getPICBaseSymbol(MF,
- OutContext);
+ O << *static_cast<const X86TargetLowering*>(TLI)->getPICBaseSymbol(*MF);
}
/// runOnMachineFunction - Emit the function body.
/// getPICBaseSymbol - Return the X86-32 PIC base.
MCSymbol *
-X86TargetLowering::getPICBaseSymbol(const MachineFunction *MF,
- MCContext &Ctx) const {
+X86TargetLowering::getPICBaseSymbol(const MachineFunction &MF) const {
+
const MCAsmInfo &MAI = *getTargetMachine().getMCAsmInfo();
+ MCContext &Ctx = MF.getContext();
return Ctx.GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix())+
- Twine(MF->getFunctionNumber())+"$pb");
+ Twine(MF.getFunctionNumber())+"$pb");
}
return TargetLowering::getPICJumpTableRelocBaseExpr(MF, JTI, Ctx);
// Otherwise, the reference is relative to the PIC base.
- return MCSymbolRefExpr::Create(getPICBaseSymbol(MF, Ctx), Ctx);
+ return MCSymbolRefExpr::Create(getPICBaseSymbol(*MF), Ctx);
}
/// getFunctionAlignment - Return the Log2 alignment of this function.
explicit X86TargetLowering(X86TargetMachine &TM);
/// getPICBaseSymbol - Return the X86-32 PIC base.
- MCSymbol *getPICBaseSymbol(const MachineFunction *MF, MCContext &Ctx) const;
+ MCSymbol *getPICBaseSymbol(const MachineFunction &MF) const;
virtual unsigned getJumpTableEncoding() const;
MCSymbol *X86MCInstLower::GetPICBaseSymbol() const {
return static_cast<const X86TargetLowering*>(TM.getTargetLowering())->
- getPICBaseSymbol(&MF, Ctx);
+ getPICBaseSymbol(MF);
}
/// GetSymbolFromOperand - Lower an MO_GlobalAddress or MO_ExternalSymbol