summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-26 06:28:43 +0000
committerChris Lattner <sabre@nondot.org>2010-01-26 06:28:43 +0000
commit589c6f620e8dcf3d59af1ae0e15372c934647c82 (patch)
tree416f671c04eaddff62cc5fa28c6842862157b44c /lib/CodeGen/SelectionDAG/TargetLowering.cpp
parentbeeb93e6ba48af2661eabc4872d8b159fb43e5db (diff)
downloadexternal_llvm-589c6f620e8dcf3d59af1ae0e15372c934647c82.zip
external_llvm-589c6f620e8dcf3d59af1ae0e15372c934647c82.tar.gz
external_llvm-589c6f620e8dcf3d59af1ae0e15372c934647c82.tar.bz2
Move getJTISymbol from MachineJumpTableInfo to MachineFunction,
which is more convenient, and change getPICJumpTableRelocBaseExpr to take a MachineFunction to match. Next, move the X86 code that create a PICBase symbol to X86TargetLowering::getPICBaseSymbol from X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific library. This eliminates a 'gross hack', and allows us to implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now calls it. This in turn allows us to eliminate the X86AsmPrinter::printPICJumpTableSetLabel method, which was the only overload of printPICJumpTableSetLabel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index ccdedde..5a0bdb4 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -23,6 +23,7 @@
#include "llvm/DerivedTypes.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/ErrorHandling.h"
@@ -823,11 +824,10 @@ SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
/// given PIC jumptable, the same as getPICJumpTableRelocBase, but as an
/// MCExpr.
const MCExpr *
-TargetLowering::getPICJumpTableRelocBaseExpr(const MachineJumpTableInfo *MJTI,
- unsigned JTI,
- MCContext &Ctx) const {
+TargetLowering::getPICJumpTableRelocBaseExpr(const MachineFunction *MF,
+ unsigned JTI,MCContext &Ctx) const{
// The normal PIC reloc base is the label at the start of the jump table.
- return MCSymbolRefExpr::Create(MJTI->getJTISymbol(JTI, Ctx), Ctx);
+ return MCSymbolRefExpr::Create(MF->getJTISymbol(JTI, Ctx), Ctx);
}
bool