projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b4dcbb
)
Parse const expr cast instruction the same way the instruction is formed
author
Chris Lattner
<sabre@nondot.org>
Thu, 15 Aug 2002 19:37:11 +0000
(19:37 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 15 Aug 2002 19:37:11 +0000
(19:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3353
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/llvmAsmParser.y
patch
|
blob
|
history
diff --git
a/lib/AsmParser/llvmAsmParser.y
b/lib/AsmParser/llvmAsmParser.y
index 5eed0ebc57e7d7d1797956554de0f69887068951..47685355f601b76068ecf5d13d4947ef5ce09d1a 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-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 $1;
+ delete $5;
}
| Types GETELEMENTPTR '(' ConstVal IndexList ')' {
if (!isa<PointerType>($4->getType()))
}
| Types GETELEMENTPTR '(' ConstVal IndexList ')' {
if (!isa<PointerType>($4->getType()))