summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/thunks.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-04 23:46:35 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-04 23:46:35 +0000
commitc8bd9c277bf9946870b69333edd21a25aa482048 (patch)
tree0f9f3bc664b1c710455517f6d4fa39187bcbb167 /clang/test/CodeGenCXX/thunks.cpp
parent6b67ee425df4eda3671408252b45e2fc7aaf05fd (diff)
downloadbcm5719-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.cpp15
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(
OpenPOWER on IntegriCloud