summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-04-23 14:02:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-04-23 14:02:53 +0000
commit23fd21d4eed7159339b25a2f09ae74cf67626547 (patch)
treed0d16b9a874831aa97dc6dfcac3df3d53001cbd2
parentfbadfddcf1ed97d4a89c047cee515cedf91b54e4 (diff)
downloadbcm5719-llvm-23fd21d4eed7159339b25a2f09ae74cf67626547.tar.gz
bcm5719-llvm-23fd21d4eed7159339b25a2f09ae74cf67626547.zip
Add another testcase that was not being covered.
llvm-svn: 155351
-rw-r--r--clang/test/CodeGenCXX/visibility.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility.cpp b/clang/test/CodeGenCXX/visibility.cpp
index b9ed3730011..d126de3d051 100644
--- a/clang/test/CodeGenCXX/visibility.cpp
+++ b/clang/test/CodeGenCXX/visibility.cpp
@@ -682,3 +682,21 @@ namespace test34 {
// CHECK: define weak_odr void @_ZN6test343barINS_3fooEEEvv
// CHECK-HIDDEN: define weak_odr void @_ZN6test343barINS_3fooEEEvv
}
+
+namespace test35 {
+ // This is a really ugly testcase. GCC propagates the DEFAULT in zed's
+ // definition. What we do instead is be conservative about merging
+ // implicit visibilities.
+ // FIXME: Maybe the best thing to do here is error? The test at least
+ // makes sure we don't produce a hidden symbol for foo<zed>::bar.
+ template<typename T>
+ struct DEFAULT foo {
+ void bar() {}
+ };
+ class zed;
+ template class foo<zed>;
+ class DEFAULT zed {
+ };
+ // CHECK: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
+ // CHECK-HIDDEN: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
+}
OpenPOWER on IntegriCloud