mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Parse const expr cast instruction the same way the instruction is formed
llvm-svn: 3353
This commit is contained in:
parent
0812b53cc4
commit
7cd8403f2b
@ -993,9 +993,12 @@ ConstVal : SIntType EINT64VAL { // integral constants
|
||||
};
|
||||
|
||||
|
||||
ConstExpr: Types CAST ConstVal {
|
||||
$$ = ConstantExpr::getCast($3, $1->get());
|
||||
ConstExpr: Types CAST ConstVal TO Types {
|
||||
$$ = ConstantExpr::getCast($3, $5->get());
|
||||
if ($1->get() != $5->get())
|
||||
ThrowException("Mismatching ConstExpr cast type");
|
||||
delete $1;
|
||||
delete $5;
|
||||
}
|
||||
| Types GETELEMENTPTR '(' ConstVal IndexList ')' {
|
||||
if (!isa<PointerType>($4->getType()))
|
||||
|
Loading…
Reference in New Issue
Block a user