Fix the xfail I added a couple of patches back. The issue
[oota-llvm.git] / include / llvm / IntrinsicInst.h
index 5808938400c22244ef6c496c27dcefc7b44cf477..d86b33ef50a8e8cc22af165f67cb7f4b84226af8 100644 (file)
@@ -82,7 +82,7 @@ namespace llvm {
   ///
   class DbgDeclareInst : public DbgInfoIntrinsic {
   public:
-    Value *getAddress()  const { return getOperand(1); }
+    Value *getAddress() const;
     MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); }
 
     // Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -99,9 +99,14 @@ namespace llvm {
   ///
   class DbgValueInst : public DbgInfoIntrinsic {
   public:
-    Value *getValue() const;
-    Value *getOffset() const { return getOperand(2); }
-    MDNode *getVariable() const { return cast<MDNode>(getOperand(3)); }
+    const Value *getValue() const;
+    Value *getValue();
+    uint64_t getOffset() const {
+      return cast<ConstantInt>(
+                             const_cast<Value*>(getOperand(2)))->getZExtValue();
+    }
+    const MDNode *getVariable() const { return cast<MDNode>(getOperand(3)); }
+    MDNode *getVariable() { return cast<MDNode>(getOperand(3)); }
 
     // Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const DbgValueInst *) { return true; }