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:
222b86f
)
Add a check to avoid an assertion on malformed input
author
Chris Lattner
<sabre@nondot.org>
Sat, 9 Oct 2004 02:18:58 +0000
(
02:18
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 9 Oct 2004 02:18:58 +0000
(
02:18
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16861
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 ce92c9cb6974f68f8be0bb88fdbac9d711890f00..70aee05f1ceed33402328703a9db3d030a9ba674 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-2120,6
+2120,9
@@
MemoryInst : MALLOC Types {
if (!isa<PointerType>($3->get()))
ThrowException("Can't load from nonpointer type: " +
(*$3)->getDescription());
+ if (!cast<PointerType>($3->get())->getElementType()->isFirstClassType())
+ ThrowException("Can't load from pointer of non-first-class type: " +
+ (*$3)->getDescription());
$$ = new LoadInst(getVal(*$3, $4), "", $1);
delete $3;
}