Added an offset field to ConstantPoolSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26371 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index b72bf20..a4e8854 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1028,19 +1028,19 @@
 
 class GlobalAddressSDNode : public SDNode {
   GlobalValue *TheGlobal;
-  int offset;
+  int Offset;
 protected:
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
                       int o=0)
-    : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT) {
+    : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT),
+      Offset(o) {
     TheGlobal = const_cast<GlobalValue*>(GA);
-    offset = o;
   }
 public:
 
   GlobalValue *getGlobal() const { return TheGlobal; }
-  int getOffset() const { return offset; }
+  int getOffset() const { return Offset; }
 
   static bool classof(const GlobalAddressSDNode *) { return true; }
   static bool classof(const SDNode *N) {
@@ -1069,19 +1069,22 @@
 
 class ConstantPoolSDNode : public SDNode {
   Constant *C;
+  int Offset;
   unsigned Alignment;
 protected:
   friend class SelectionDAG;
-  ConstantPoolSDNode(Constant *c, MVT::ValueType VT, bool isTarget)
+  ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT,
+                     int o=0)
     : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT),
-    C(c), Alignment(0) {}
-  ConstantPoolSDNode(Constant *c, MVT::ValueType VT, unsigned Align,
-                     bool isTarget)
+      C(c), Offset(o), Alignment(0) {}
+  ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, int o,
+                     unsigned Align)
     : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT),
-    C(c), Alignment(Align) {}
+      C(c), Offset(o), Alignment(Align) {}
 public:
 
   Constant *get() const { return C; }
+  int getOffset() const { return Offset; }
   
   // Return the alignment of this constant pool object, which is either 0 (for
   // default alignment) or log2 of the desired value.