diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-05 22:58:34 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-05 22:58:34 +0000 |
commit | 2968b7741da535810250b919c95d12105882d19f (patch) | |
tree | 7e6f38562e88a57502cbbc8c554496688888eb17 /test/CodeGen/attributes.c | |
parent | 71248835a65a4346e6ae8bcc9f6c332942244035 (diff) |
weak_import should not make definitions have weak linkage.
- <rdar://problem/6948703> clang treats weak_import like weak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/attributes.c')
-rw-r--r-- | test/CodeGen/attributes.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c index d45d5124b0..a5de4f4b42 100644 --- a/test/CodeGen/attributes.c +++ b/test/CodeGen/attributes.c @@ -14,7 +14,7 @@ // RUN: grep '@t13 =.*section "SECT"' %t && // RUN: grep '@t14.x =.*section "SECT"' %t // RUN: grep 'declare extern_weak i32 @t15()' %t && -// RUN: grep '@t16 = extern_weak global i32' %t +// RUN: grep '@t16 = extern_weak global i32' %t && void t1() __attribute__((noreturn)); void t1() {} @@ -56,4 +56,14 @@ int t17() { return t15() + t16; } +// RUN: grep '@t18 = global i[0-9]* 1, align .*' %t && +extern int t18 __attribute__((weak_import)); +int t18 = 1; +// RUN: grep 'define i[0-9]* @t19() nounwind {' %t && +extern int t19(void) __attribute__((weak_import)); +int t19(void) { + return 10; +} + +// RUN: true |