[llvm-commits] [llvm] r60677 - /llvm/trunk/include/llvm/ADT/PointerIntPair.h
Dan Gohman
gohman at apple.com
Sun Dec 7 13:28:11 PST 2008
Author: djg
Date: Sun Dec 7 15:28:00 2008
New Revision: 60677
URL: http://llvm.org/viewvc/llvm-project?rev=60677&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/ADT/PointerIntPair.h
Modified: llvm/trunk/include/llvm/ADT/PointerIntPair.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerIntPair.h?rev=60677&r1=60676&r2=60677&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h Sun Dec 7 15:28:00 2008
@@ -53,7 +53,7 @@
}
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;
}
More information about the llvm-commits
mailing list