summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PointerIntPair.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-07 21:28:00 +0000
committerDan Gohman <gohman@apple.com>2008-12-07 21:28:00 +0000
commit994fd5354b13c9b934f7ff82ac6e5742f982af33 (patch)
tree214d296acf07438bb58f9604a16b14308e781305 /include/llvm/ADT/PointerIntPair.h
parent3f7eb5b795f933aecf0e0f1fea646c516f6dc1c5 (diff)
downloadllvm-994fd5354b13c9b934f7ff82ac6e5742f982af33.tar.gz
llvm-994fd5354b13c9b934f7ff82ac6e5742f982af33.tar.bz2
llvm-994fd5354b13c9b934f7ff82ac6e5742f982af33.tar.xz
Use intptr_t instead of unsigned here, which is more appropriate
in a really obscure way, but more importantly has the side effect of avoiding a GCC warning in the case that IntType is bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PointerIntPair.h')
-rw-r--r--include/llvm/ADT/PointerIntPair.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h
index d5c89b890a..9d34b44a53 100644
--- a/include/llvm/ADT/PointerIntPair.h
+++ b/include/llvm/ADT/PointerIntPair.h
@@ -53,7 +53,7 @@ public:
}
void setInt(IntType Int) {
- assert(unsigned(Int) < (1 << IntBits) && "Integer too large for field");
+ assert(intptr_t(Int) < (1 << IntBits) && "Integer too large for field");
Value = reinterpret_cast<intptr_t>(getPointer()) | (intptr_t)Int;
}