summaryrefslogtreecommitdiffstats
path: root/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
commit65005536dee9216b14e2361153a14ddd8a7cd50a (patch)
tree377e607e7a538ee3c6f66737877ccb4442c15139 /test/CodeGenCXX/thunks.cpp
parentb8727e514393e036c88497a15ae4f61e3a4a28b3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/thunks.cpp')
-rw-r--r--test/CodeGenCXX/thunks.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp
index 1de576128a..5ecaacb16a 100644
--- a/test/CodeGenCXX/thunks.cpp
+++ b/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(