stub out a new target hook, need some refactoring before I can
authorChris Lattner <sabre@nondot.org>
Tue, 26 Jan 2010 05:30:30 +0000 (05:30 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Jan 2010 05:30:30 +0000 (05:30 +0000)
implement it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94521 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/TargetLowering.cpp

index 5f379918f63ca4a0356b2ca0f6bc3aad490cc1b5..a1ce236407776e69ad81e561615556d230bae807 100644 (file)
@@ -772,6 +772,13 @@ public:
   virtual SDValue getPICJumpTableRelocBase(SDValue Table,
                                            SelectionDAG &DAG) const;
 
+  /// getPICJumpTableRelocBaseExpr - This returns the relocation base for the
+  /// given PIC jumptable, the same as getPICJumpTableRelocBase, but as an
+  /// MCExpr.
+  virtual const MCExpr *
+  getPICJumpTableRelocBaseExpr(const MachineJumpTableInfo *MJTI,
+                               unsigned JTI, MCContext &Ctx) const;
+  
   /// isOffsetFoldingLegal - Return true if folding a constant offset
   /// with the given GlobalAddress is legal.  It is frequently not legal in
   /// PIC relocation models.
index 966c817ad9b870619e8308f475eed0e385674c46..34a31788ed02bfc0fa3a4a817f48d17ce758001e 100644 (file)
@@ -817,6 +817,17 @@ SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
   return Table;
 }
 
+/// getPICJumpTableRelocBaseExpr - This returns the relocation base for the
+/// given PIC jumptable, the same as getPICJumpTableRelocBase, but as an
+/// MCExpr.
+const MCExpr *
+TargetLowering::getPICJumpTableRelocBaseExpr(const MachineJumpTableInfo *MJTI,
+                                             unsigned JTI,
+                                             MCContext &Ctx) const {
+  assert(0 && "FIXME: IMPLEMENT ME");
+}
+
+
 bool
 TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
   // Assume that everything is safe in static mode.