diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-01-18 19:50:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-01-18 19:50:32 +0000 |
| commit | ffcec8f0d8ab20d2c66e07a582acbda5e6c3775b (patch) | |
| tree | d192c08f6812b711438ad3b996ae3f49e9ae2b1d /llvm/lib/VMCore/Verifier.cpp | |
| parent | 748ceca6954998ea0e92e2c9c0a86201c7a03312 (diff) | |
| download | bcm5719-llvm-ffcec8f0d8ab20d2c66e07a582acbda5e6c3775b.tar.gz bcm5719-llvm-ffcec8f0d8ab20d2c66e07a582acbda5e6c3775b.zip | |
reject some invalid IR. We already assert and reject this from the
.ll parser, but PR6070 wants it in the verifier too.
llvm-svn: 93756
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index ec475e47297..91517ea7f6a 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -1301,6 +1301,8 @@ void Verifier::visitAllocaInst(AllocaInst &AI) { &AI); Assert1(PTy->getElementType()->isSized(), "Cannot allocate unsized type", &AI); + Assert1(AI.getArraySize()->getType()->isInteger(32), + "Alloca array size must be i32", &AI); visitInstruction(AI); } |

