summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/attributes.c')
-rw-r--r--clang/test/CodeGen/attributes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attributes.c b/clang/test/CodeGen/attributes.c
index 171c81081a4..25b9fd064df 100644
--- a/clang/test/CodeGen/attributes.c
+++ b/clang/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;
+}
+
+
OpenPOWER on IntegriCloud