From b905b09f2167c5c45e23e55e609b8acff07d317d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Jan 2010 19:50:32 +0000 Subject: [PATCH] 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 --- lib/VMCore/Verifier.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index ec475e47297..91517ea7f6a 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); } -- 2.34.1