diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-14 22:48:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-14 22:48:15 +0000 |
commit | 7077efe894cd456e57763f05ffb51e544a2a147e (patch) | |
tree | c2b9cbf4ea27d7578fc91f2df5bebbb6fb90cceb /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | 239f9a35edfeca699e35112938b23c555065dbfd (diff) | |
download | bcm5719-llvm-7077efe894cd456e57763f05ffb51e544a2a147e.tar.gz bcm5719-llvm-7077efe894cd456e57763f05ffb51e544a2a147e.zip |
move the pic base symbol stuff up to MachineFunction
since it is trivial and will be shared between ppc and x86.
This substantially simplifies the X86 backend also.
llvm-svn: 119089
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 103c70b86f0..a3cd0359a5e 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -1102,17 +1102,6 @@ unsigned X86TargetLowering::getJumpTableEncoding() const { return TargetLowering::getJumpTableEncoding(); } -/// getPICBaseSymbol - Return the X86-32 PIC base. -MCSymbol * -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"); -} - - const MCExpr * X86TargetLowering::LowerCustomJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, @@ -1147,7 +1136,7 @@ getPICJumpTableRelocBaseExpr(const MachineFunction *MF, unsigned JTI, return TargetLowering::getPICJumpTableRelocBaseExpr(MF, JTI, Ctx); // Otherwise, the reference is relative to the PIC base. - return MCSymbolRefExpr::Create(getPICBaseSymbol(*MF), Ctx); + return MCSymbolRefExpr::Create(MF->getPICBaseSymbol(), Ctx); } /// getFunctionAlignment - Return the Log2 alignment of this function. |