From a3b0eb2f7fecd0fe15566b01215602a9784003ed Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 16 Feb 2015 08:38:03 +0000 Subject: AsmParser: Reject alloca with function type llvm-svn: 229363 --- llvm/test/Assembler/alloca-invalid-type-2.ll | 9 +++++++++ llvm/test/Assembler/alloca-invalid-type.ll | 2 +- llvm/test/Verifier/2008-03-01-AllocaSized.ll | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 llvm/test/Assembler/alloca-invalid-type-2.ll (limited to 'llvm/test') diff --git a/llvm/test/Assembler/alloca-invalid-type-2.ll b/llvm/test/Assembler/alloca-invalid-type-2.ll new file mode 100644 index 00000000000..7b1cc625542 --- /dev/null +++ b/llvm/test/Assembler/alloca-invalid-type-2.ll @@ -0,0 +1,9 @@ +; RUN: not llvm-as < %s 2>&1 | FileCheck %s + +; CHECK: invalid type for alloca + +define void @test() { +entry: + alloca i32 (i32) + ret void +} diff --git a/llvm/test/Assembler/alloca-invalid-type.ll b/llvm/test/Assembler/alloca-invalid-type.ll index fb2c05cc35a..413bcbd76ba 100644 --- a/llvm/test/Assembler/alloca-invalid-type.ll +++ b/llvm/test/Assembler/alloca-invalid-type.ll @@ -1,6 +1,6 @@ ; RUN: not llvm-as < %s 2>&1 | FileCheck %s -; CHECK: pointer to this type is invalid +; CHECK: invalid type for alloca define void @test() { entry: diff --git a/llvm/test/Verifier/2008-03-01-AllocaSized.ll b/llvm/test/Verifier/2008-03-01-AllocaSized.ll index fc12a96e4f9..7478334959f 100644 --- a/llvm/test/Verifier/2008-03-01-AllocaSized.ll +++ b/llvm/test/Verifier/2008-03-01-AllocaSized.ll @@ -1,5 +1,5 @@ ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s -; CHECK: Cannot allocate unsized type +; CHECK: invalid type for alloca ; PR2113 define void @test() { -- cgit v1.2.3