mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Give better assertion message for error conditions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0235fe2b72
commit
562219de55
@ -174,10 +174,14 @@ ConstantInt::ConstantInt(const Type *Ty, uint64_t V) : ConstantIntegral(Ty) {
|
||||
}
|
||||
|
||||
ConstantSInt::ConstantSInt(const Type *Ty, int64_t V) : ConstantInt(Ty, V) {
|
||||
assert(Ty->isInteger() && Ty->isSigned() &&
|
||||
"Illegal type for unsigned integer constant!");
|
||||
assert(isValueValidForType(Ty, V) && "Value too large for type!");
|
||||
}
|
||||
|
||||
ConstantUInt::ConstantUInt(const Type *Ty, uint64_t V) : ConstantInt(Ty, V) {
|
||||
assert(Ty->isInteger() && Ty->isUnsigned() &&
|
||||
"Illegal type for unsigned integer constant!");
|
||||
assert(isValueValidForType(Ty, V) && "Value too large for type!");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user