diff options
Diffstat (limited to 'test/Assembler')
-rw-r--r-- | test/Assembler/invalid-landingpad.ll | 4 | ||||
-rw-r--r-- | test/Assembler/invalid-safestack-param.ll | 4 | ||||
-rw-r--r-- | test/Assembler/invalid-safestack-return.ll | 4 | ||||
-rw-r--r-- | test/Assembler/unnamed-alias.ll | 11 |
4 files changed, 21 insertions, 2 deletions
diff --git a/test/Assembler/invalid-landingpad.ll b/test/Assembler/invalid-landingpad.ll index c8eab4ac6aef..44bf8db17687 100644 --- a/test/Assembler/invalid-landingpad.ll +++ b/test/Assembler/invalid-landingpad.ll @@ -2,6 +2,6 @@ ; CHECK: clause argument must be a constant -define void @test(i32 %in) { - landingpad {} personality void()* null filter i32 %in +define void @test(i32 %in) personality void()* null { + landingpad {} filter i32 %in } diff --git a/test/Assembler/invalid-safestack-param.ll b/test/Assembler/invalid-safestack-param.ll new file mode 100644 index 000000000000..b9046c4c33bd --- /dev/null +++ b/test/Assembler/invalid-safestack-param.ll @@ -0,0 +1,4 @@ +; RUN: not llvm-as -o /dev/null %s 2>&1 | FileCheck %s + +; CHECK: error: invalid use of function-only attribute +declare void @foo(i32 safestack %x) diff --git a/test/Assembler/invalid-safestack-return.ll b/test/Assembler/invalid-safestack-return.ll new file mode 100644 index 000000000000..605e72e84c8e --- /dev/null +++ b/test/Assembler/invalid-safestack-return.ll @@ -0,0 +1,4 @@ +; RUN: not llvm-as -o /dev/null %s 2>&1 | FileCheck %s + +; CHECK: error: invalid use of function-only attribute +declare safestack void @foo() diff --git a/test/Assembler/unnamed-alias.ll b/test/Assembler/unnamed-alias.ll new file mode 100644 index 000000000000..8ae1c45d312d --- /dev/null +++ b/test/Assembler/unnamed-alias.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +@0 = private constant i32 0 +; CHECK: @0 = private constant i32 0 +@1 = private constant i32 1 +; CHECK: @1 = private constant i32 1 + +@2 = private alias i32* @0 +; CHECK: @2 = private alias i32* @0 +@3 = private alias i32* @1 +; CHECK: @3 = private alias i32* @1 |