summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-12-27 21:15:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-12-27 21:15:28 +0000
commit0b79046c5cd9f02a2c8a6066ebb96c80ed555ef7 (patch)
tree92319a2a89a84477893bd9da8288ffad5d079e56 /clang/test
parent46236ee5cf1edadd5863c92a7388cf31aa820ff8 (diff)
downloadbcm5719-llvm-0b79046c5cd9f02a2c8a6066ebb96c80ed555ef7.tar.gz
bcm5719-llvm-0b79046c5cd9f02a2c8a6066ebb96c80ed555ef7.zip
Fix the visibility of methods of explicit template instantiation definition
when using -fvisibility-inlines-hidden. This matches gcc's behavior and documentation. Fixes PR11642. llvm-svn: 147295
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/visibility-inlines-hidden.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
index f7fabed8c10..d660b1b4105 100644
--- a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
+++ b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
@@ -97,3 +97,14 @@ namespace test2 {
// CHECK: define available_externally void @_ZN5test22ns3fooINS_1BINS_1AEEEEEvv()
}
+
+namespace PR11642 {
+ template <typename T>
+ class Foo {
+ public:
+ T foo(T x) { return x; }
+ };
+ extern template class Foo<int>;
+ template class Foo<int>;
+ // CHECK: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi
+}
OpenPOWER on IntegriCloud