diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
commit | 050e163ae8b4bb6eb252b59e2f8f36e68ae9239d (patch) | |
tree | 7376a0c71aad05d327e5b1dcbceb3311a10f9f29 /include/llvm/ADT/PointerIntPair.h | |
parent | 8a6c1c25bce0267ee4072bd7b786b921e8a66a35 (diff) |
Notes
Diffstat (limited to 'include/llvm/ADT/PointerIntPair.h')
-rw-r--r-- | include/llvm/ADT/PointerIntPair.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index 0058d85d1ae4..83fbf127e6da 100644 --- a/include/llvm/ADT/PointerIntPair.h +++ b/include/llvm/ADT/PointerIntPair.h @@ -55,20 +55,25 @@ public: PointerTy getPointer() const { return Info::getPointer(Value); } - IntType getInt() const { return (IntType)Info::getInt(Value); } + IntType getInt() const { + return (IntType)Info::getInt(Value); + } void setPointer(PointerTy PtrVal) { Value = Info::updatePointer(Value, PtrVal); } - void setInt(IntType IntVal) { Value = Info::updateInt(Value, IntVal); } + void setInt(IntType IntVal) { + Value = Info::updateInt(Value, static_cast<intptr_t>(IntVal)); + } void initWithPointer(PointerTy PtrVal) { Value = Info::updatePointer(0, PtrVal); } void setPointerAndInt(PointerTy PtrVal, IntType IntVal) { - Value = Info::updateInt(Info::updatePointer(0, PtrVal), IntVal); + Value = Info::updateInt(Info::updatePointer(0, PtrVal), + static_cast<intptr_t>(IntVal)); } PointerTy const *getAddrOfPointer() const { |