aboutsummaryrefslogtreecommitdiffstats
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
commita138781a9b21bc62dbf2a89304eb9d6d9da1623c (patch)
treeab45f5b280a91176233a31b29271a134adcded60
parent43b36f768dfdc94cbf33ede40fc10ab29d402b7f (diff)
downloadexternal_llvm-a138781a9b21bc62dbf2a89304eb9d6d9da1623c.zip
external_llvm-a138781a9b21bc62dbf2a89304eb9d6d9da1623c.tar.gz
external_llvm-a138781a9b21bc62dbf2a89304eb9d6d9da1623c.tar.bz2
reject some invalid IR. We already assert and reject this from the
.ll parser, but PR6070 wants it in the verifier too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93756 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Verifier.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index ec475e4..91517ea 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/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);
}