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:
31f8499
)
Don't crash on bogus source value
author
Chris Lattner
<sabre@nondot.org>
Fri, 21 Nov 2003 20:27:35 +0000
(20:27 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 21 Nov 2003 20:27:35 +0000
(20:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10132
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 e930bc55eb88d47d7fbfd477b90547f715f022df..8e4450138e841b9298bf842a905b897993917bf3 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-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() + "'!");