diff options
author | John McCall <rjmccall@apple.com> | 2010-08-04 23:46:35 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-04 23:46:35 +0000 |
commit | c8bd9c277bf9946870b69333edd21a25aa482048 (patch) | |
tree | 0f9f3bc664b1c710455517f6d4fa39187bcbb167 /clang/test/CodeGenCXX/thunks.cpp | |
parent | 6b67ee425df4eda3671408252b45e2fc7aaf05fd (diff) | |
download | bcm5719-llvm-c8bd9c277bf9946870b69333edd21a25aa482048.tar.gz bcm5719-llvm-c8bd9c277bf9946870b69333edd21a25aa482048.zip |
Extend the visibility-hidden optimization to linkonce_odr thunks for
functions with in-line definitions, since such thunks will be emitted at any
use of the function.
Completes the feature work for rdar://problem/7523229.
llvm-svn: 110285
Diffstat (limited to 'clang/test/CodeGenCXX/thunks.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/thunks.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp index 1de576128a1..5ecaacb16a9 100644 --- a/clang/test/CodeGenCXX/thunks.cpp +++ b/clang/test/CodeGenCXX/thunks.cpp @@ -246,8 +246,21 @@ namespace Test9 { } } +namespace Test10 { + struct A { virtual void foo(); }; + struct B { virtual void foo(); }; + struct C : A, B { void foo() {} }; + + // CHECK: define linkonce_odr void @_ZN6Test101C3fooEv + // CHECK: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv + + void test() { + C c; + } +} + /**** The following has to go at the end of the file ****/ // This is from Test5: -// CHECK: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv +// CHECK: define linkonce_odr hidden void @_ZTv0_n24_N5Test51B1fEv // CHECK: define internal void @_ZThn8_N12_GLOBAL__N_11C1fEv( |