diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-13 01:30:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-13 01:30:30 +0000 |
commit | d72479c2f061e3b57adf3d054875665f25a30d90 (patch) | |
tree | 1c22fc27e9e82663599b3df81b78626b59894034 /test/Assembler | |
parent | fef9ff492206330ff0a5b94cec5ac1455b28df88 (diff) |
Reject uses of unnamed_addr in declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r-- | test/Assembler/declare-unnamed-addr.ll | 8 | ||||
-rw-r--r-- | test/Assembler/external-unnamed-addr.ll | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/Assembler/declare-unnamed-addr.ll b/test/Assembler/declare-unnamed-addr.ll new file mode 100644 index 0000000000..ac74299c71 --- /dev/null +++ b/test/Assembler/declare-unnamed-addr.ll @@ -0,0 +1,8 @@ +; RUN: not llvm-as %s -o /dev/null 2>%t +; RUN: FileCheck -input-file=%t %s + +declare unnamed_addr i32 @zed() + +// CHECK: error: only definitions can have unnamed_addr +// CHECK: declare unnamed_addr i32 @zed() +// CHECK: ^ diff --git a/test/Assembler/external-unnamed-addr.ll b/test/Assembler/external-unnamed-addr.ll new file mode 100644 index 0000000000..856f592e80 --- /dev/null +++ b/test/Assembler/external-unnamed-addr.ll @@ -0,0 +1,8 @@ +; RUN: not llvm-as %s -o /dev/null 2>%t +; RUN: FileCheck -input-file=%t %s + +@foo = external unnamed_addr global i8* + +// CHECK: error: only definitions can have unnamed_addr +// CHECK: @foo = external unnamed_addr global i8* +// CHECK: ^ |