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:
parent
98eee41567
commit
7f54c665a2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user