mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
Don't crash on bogus source value
llvm-svn: 10132
This commit is contained in:
parent
a1da49a55c
commit
70c6fff394
@ -1171,6 +1171,9 @@ ConstVal : SIntType EINT64VAL { // integral constants
|
||||
|
||||
|
||||
ConstExpr: CAST '(' ConstVal TO Types ')' {
|
||||
if (!$3->getType()->isFirstClassType())
|
||||
ThrowException("cast constant expression from a non-primitive type: '" +
|
||||
$3->getType()->getDescription() + "'!");
|
||||
if (!$5->get()->isFirstClassType())
|
||||
ThrowException("cast constant expression to a non-primitive type: '" +
|
||||
$5->get()->getDescription() + "'!");
|
||||
|
Loading…
Reference in New Issue
Block a user