From 5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2 Mon Sep 17 00:00:00 2001 From: Victor Hernandez Date: Mon, 11 Jan 2010 07:45:19 +0000 Subject: Respond to Chris' review: Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t. Get constness correct for getVariable() and getValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93149 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IntrinsicInst.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/llvm/IntrinsicInst.h') diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 5808938400..151e4344f3 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -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(getOperand(3)); } + const Value *getValue() const; + Value *getValue(); + uint64_t getOffset() const { + return cast( + const_cast(getOperand(2)))->getZExtValue(); + } + const MDNode *getVariable() const { return cast(getOperand(3)); } + MDNode *getVariable() { return cast(getOperand(3)); } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgValueInst *) { return true; } -- cgit v1.2.3