mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Don't crash on bogus source value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31f8499e83
commit
ae711a8b48
@ -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