summaryrefslogtreecommitdiff
path: root/test/CodeGen/attributes.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-06 16:20:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-06 16:20:49 +0000
commit5e27314eb5a9cba7997cf9f6fc82428d99667077 (patch)
tree9125dd1049a91bab32ddced99441119c2a3485c9 /test/CodeGen/attributes.c
parent4850451c8e93789c099d907dd469898ea9561ecb (diff)
downloadclang-5e27314eb5a9cba7997cf9f6fc82428d99667077.tar.gz
IRgen support for weak_import.
- <rdar://problem/6652110> clang should support weak_import git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/attributes.c')
-rw-r--r--test/CodeGen/attributes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c
index 171c81081a..25b9fd064d 100644
--- a/test/CodeGen/attributes.c
+++ b/test/CodeGen/attributes.c
@@ -13,6 +13,8 @@
// RUN: grep '@t12 =.*section "SECT"' %t &&
// 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
void t1() __attribute__((noreturn));
void t1() {}
@@ -47,3 +49,11 @@ struct s0 t13 __attribute__((section("SECT"))) = { 0 };
void t14(void) {
static int x __attribute__((section("SECT"))) = 0;
}
+
+int __attribute__((weak_import)) t15(void);
+extern int t16 __attribute__((weak_import));
+int t17() {
+ return t15() + t16;
+}
+
+