e2496b1b07
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=114
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
Index: test/CodeGenCXX/visibility-inlines-hidden.cpp
|
|
===================================================================
|
|
--- test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147294)
|
|
+++ test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147295)
|
|
@@ -97,3 +97,14 @@
|
|
|
|
// 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
|
|
+}
|
|
Index: lib/AST/Decl.cpp
|
|
===================================================================
|
|
--- lib/AST/Decl.cpp (revision 147294)
|
|
+++ lib/AST/Decl.cpp (revision 147295)
|
|
@@ -568,6 +568,7 @@
|
|
// about whether containing classes have visibility attributes,
|
|
// and that's intentional.
|
|
if (TSK != TSK_ExplicitInstantiationDeclaration &&
|
|
+ TSK != TSK_ExplicitInstantiationDefinition &&
|
|
F.ConsiderGlobalVisibility &&
|
|
MD->getASTContext().getLangOptions().InlineVisibilityHidden) {
|
|
// InlineVisibilityHidden only applies to definitions, and
|