mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-17 00:57:54 +00:00
Add a check to avoid an assertion on malformed input
llvm-svn: 16861
This commit is contained in:
parent
2419e1d27e
commit
e2607964ae
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user