summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-18 19:50:32 +0000
committerChris Lattner <sabre@nondot.org>2010-01-18 19:50:32 +0000
commitffcec8f0d8ab20d2c66e07a582acbda5e6c3775b (patch)
treed192c08f6812b711438ad3b996ae3f49e9ae2b1d /llvm/lib/VMCore/Verifier.cpp
parent748ceca6954998ea0e92e2c9c0a86201c7a03312 (diff)
downloadbcm5719-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.cpp2
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);
}
OpenPOWER on IntegriCloud