diff --git a/clang-pr11642.patch b/clang-pr11642.patch new file mode 100644 index 0000000..5c202c9 --- /dev/null +++ b/clang-pr11642.patch @@ -0,0 +1,31 @@ +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 ++ class Foo { ++ public: ++ T foo(T x) { return x; } ++ }; ++ extern template class Foo; ++ template class Foo; ++ // 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 diff --git a/llvm.changes b/llvm.changes index 764416f..12d792c 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 27 21:33:48 UTC 2011 - idonmez@suse.com + +- Add upstream fix for llvm PR11642 + ------------------------------------------------------------------- Sun Dec 25 15:29:46 UTC 2011 - idonmez@suse.com diff --git a/llvm.spec b/llvm.spec index 0c75783..374de61 100644 --- a/llvm.spec +++ b/llvm.spec @@ -38,6 +38,8 @@ Patch3: assume-opensuse.patch Patch4: clang-glibc2.14.patch # PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files Patch5: clang-disable-ada-extension.patch +# PATCH-FIX-UPSTREAM http://llvm.org/viewvc/llvm-project?view=rev&revision=147295 +Patch6: clang-pr11642.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -134,6 +136,7 @@ This package contains vim plugins for LLVM like syntax highlighting. %patch3 cd tools/clang %patch4 +%patch6 cd ../.. %patch5 -p1