diff options
author | Victor Hernandez <vhernandez@apple.com> | 2010-01-11 07:45:19 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2010-01-11 07:45:19 +0000 |
commit | 5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2 (patch) | |
tree | 3eab685aa1c1aaeb80459d9c50d34d02e98fa236 /include/llvm/IntrinsicInst.h | |
parent | 8e76764de86d7906db5123626b65f593e159d9f3 (diff) | |
download | llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.tar.gz llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.tar.bz2 llvm-5b7e48b56cfc0904636a0a1c0d4f7b81133c48c2.tar.xz |
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
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r-- | include/llvm/IntrinsicInst.h | 11 |
1 files changed, 8 insertions, 3 deletions
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<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; } |