summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attr-weakref.c
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-03-04 21:26:03 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-03-04 21:26:03 +0000
commitbef98689adae3e3e2d8ccb051005648eac602d68 (patch)
tree6c10c8eb7fa5a7233101e14ddea5bf565a84acec /clang/test/CodeGen/attr-weakref.c
parent1abd1a9f4b64017265aad3c0a3c3f6e7cffad60b (diff)
downloadbcm5719-llvm-bef98689adae3e3e2d8ccb051005648eac602d68.tar.gz
bcm5719-llvm-bef98689adae3e3e2d8ccb051005648eac602d68.zip
really fix 6473 by handling weakref in constant expressions.
llvm-svn: 97750
Diffstat (limited to 'clang/test/CodeGen/attr-weakref.c')
-rw-r--r--clang/test/CodeGen/attr-weakref.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attr-weakref.c b/clang/test/CodeGen/attr-weakref.c
index 06185e8e34e..c1cc03b668d 100644
--- a/clang/test/CodeGen/attr-weakref.c
+++ b/clang/test/CodeGen/attr-weakref.c
@@ -52,3 +52,11 @@ void test6_h(void) {
void test6_foo(void) {
test6_f();
}
+
+// CHECK: declare extern_weak void @test7_f()
+void test7_f(void);
+static void test7_g(void) __attribute__((weakref("test7_f")));
+static void *const test7_zed = (void *) &test7_g;
+void* test7_h(void) {
+ return test7_zed;
+}
OpenPOWER on IntegriCloud