diff options
author | Alexander Musman <alexander.musman@gmail.com> | 2015-11-26 09:34:30 +0000 |
---|---|---|
committer | Alexander Musman <alexander.musman@gmail.com> | 2015-11-26 09:34:30 +0000 |
commit | f4db326a17df0b0b5b87ad3e9eee073da0747c33 (patch) | |
tree | 41a7a91857d3633ab3cff169730e7753216f984a /test/CodeGen/pragma-weak.c | |
parent | 3651ab647dbec78a101ac6ccca7caa3b341a0216 (diff) | |
download | clang-f4db326a17df0b0b5b87ad3e9eee073da0747c33.tar.gz |
Fix for merging decls in pragma weak
Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged.
Differential Revision: http://reviews.llvm.org/D13048
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/pragma-weak.c')
-rw-r--r-- | test/CodeGen/pragma-weak.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/pragma-weak.c b/test/CodeGen/pragma-weak.c index 36abca5de3..e63277fc23 100644 --- a/test/CodeGen/pragma-weak.c +++ b/test/CodeGen/pragma-weak.c @@ -17,6 +17,7 @@ // CHECK-DAG: @mix2 = weak alias void (), void ()* @__mix2 // CHECK-DAG: @a1 = weak alias void (), void ()* @__a1 // CHECK-DAG: @xxx = weak alias void (), void ()* @__xxx +// CHECK-DAG: @weakfoo = weak alias void {{.*}} @localfoo @@ -173,6 +174,14 @@ label: // CHECK: declare extern_weak i32 @PR16705b() // CHECK: declare extern_weak i32 @PR16705c() +// In this test case, we have a declaration of weakfoo before #pragma weak. +// Test that 2 decls for the weakfoo are merged. +extern void weakfoo(); +void localfoo() { } +#pragma weak weakfoo=localfoo +extern void externmain() { return weakfoo(); } +// CHECK-LABEL: define void @externmain() +// CHECK: call{{.*}}@weakfoo ///////////// TODO: stuff that still doesn't work |