1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

protect against negative values that would exceed allowed bit width

llvm-svn: 60239
This commit is contained in:
Torok Edwin 2008-11-29 08:52:45 +00:00
parent 98eee41567
commit 7f54c665a2

View File

@ -53,7 +53,7 @@ public:
}
void setInt(IntType Int) {
assert(Int < (1 << IntBits) && "Integer too large for field");
assert(unsigned(Int) < (1 << IntBits) && "Integer too large for field");
Value = reinterpret_cast<intptr_t>(getPointer()) | (intptr_t)Int;
}