mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
For PR409: \
Make sure to check isValueValidForType on floating point constants and give \ an error if the value is not valid, otherwise it would assert in the VMCore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
441c3cf82b
commit
9f9b3acfce
@ -1318,6 +1318,8 @@ ConstVal : SIntType EINT64VAL { // integral constants
|
||||
$$ = ConstantBool::False;
|
||||
}
|
||||
| FPType FPVAL { // Float & Double constants
|
||||
if (!ConstantFP::isValueValidForType($1, $2))
|
||||
ThrowException("Floating point constant invalid for type!!");
|
||||
$$ = ConstantFP::get($1, $2);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user