diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-22 21:39:03 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-22 21:39:03 +0000 |
commit | b1c0e204046b72828e513bad369ab03252b2c42e (patch) | |
tree | ad6f0547f21e6cead604ff953f4b7b4a0bbb3f18 /test/CodeGen/pragma-weak.c | |
parent | d205498c83c1bba1004ae41299ad7138881b9480 (diff) | |
download | clang-b1c0e204046b72828e513bad369ab03252b2c42e.tar.gz |
Treat aliases as definitions.
This fixes pr17639.
Before this patch clang would consider
void foo(void) __attribute((alias("__foo")));
a declaration. It now correctly handles it as a definition.
Initial patch by Alp Toker. I added support for variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/pragma-weak.c')
-rw-r--r-- | test/CodeGen/pragma-weak.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/CodeGen/pragma-weak.c b/test/CodeGen/pragma-weak.c index 40eb525e18..559be831a5 100644 --- a/test/CodeGen/pragma-weak.c +++ b/test/CodeGen/pragma-weak.c @@ -7,8 +7,6 @@ // CHECK-DAG: @both = alias void ()* @__both // CHECK-DAG: @both2 = alias void ()* @__both2 -// CHECK-DAG: @both3 = alias weak void ()* @__both3 -// CHECK-DAG: @a3 = alias weak void ()* @__a3 // CHECK-DAG: @weakvar_alias = alias weak i32* @__weakvar_alias // CHECK-DAG: @foo = alias weak void ()* @__foo // CHECK-DAG: @foo2 = alias weak void ()* @__foo2 @@ -125,12 +123,6 @@ void both2(void) __attribute((alias("__both2"))); // first, wins void __both2(void) {} // CHECK-LABEL: define void @__both2() -void __both3(void); -#pragma weak both3 = __both3 // first, wins -void both3(void) __attribute((alias("__both3"))); -void __both3(void) {} -// CHECK-LABEL: define void @__both3() - ///////////// ensure that #pragma weak does not alter existing __attributes() void __a1(void) __attribute((noinline)); @@ -138,14 +130,6 @@ void __a1(void) __attribute((noinline)); void __a1(void) {} // CHECK: define void @__a1() [[NI:#[0-9]+]] -// attributes introduced BEFORE a combination of #pragma weak and alias() -// hold... -void __a3(void) __attribute((noinline)); -#pragma weak a3 = __a3 -void a3(void) __attribute((alias("__a3"))); -void __a3(void) {} -// CHECK: define void @__a3() [[NI]] - #pragma weak xxx = __xxx __attribute((pure,noinline,const)) void __xxx(void) { } // CHECK: void @__xxx() [[RN:#[0-9]+]] |