[cfe-commits] r155102 - in /cfe/trunk: include/clang/AST/Decl.h test/CodeGenCXX/visibility.cpp

Nico Weber thakis at chromium.org
Sat Apr 21 21:10:41 PDT 2012


Hi Rafael,

this breaks the components build in chrome,

(below)

On Wed, Apr 18, 2012 at 10:34 PM, Rafael Espindola
<rafael.espindola at gmail.com> wrote:
> Author: rafael
> Date: Thu Apr 19 00:34:51 2012
> New Revision: 155102
>
> URL: http://llvm.org/viewvc/llvm-project?rev=155102&view=rev
> Log:
> In mergeVisibilityWithMin, let an implicit hidden symbol take precedence over
> an explicit default one. This means that with -fvisibility hidden we
> now produce a hidden symbol for
>
> template <typename T>
> class DEFAULT foo {
>  void bar() {}
> };
> class zed {};
> template class foo<zed>;
>
> This matches the behaviour of gcc 4.7.
>
> Modified:
>    cfe/trunk/include/clang/AST/Decl.h
>    cfe/trunk/test/CodeGenCXX/visibility.cpp
>
> Modified: cfe/trunk/include/clang/AST/Decl.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=155102&r1=155101&r2=155102&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/AST/Decl.h (original)
> +++ cfe/trunk/include/clang/AST/Decl.h Thu Apr 19 00:34:51 2012
> @@ -281,9 +281,10 @@
>       if (visibility() < V)
>         return;
>
> -      // If this visibility is explicit, keep it.
> -      if (visibilityExplicit() && !E)
> +      // Don't lose the explicit bit for nothing
> +      if (visibility() == V && visibilityExplicit())
>         return;
> +
>       setVisibility(V, E);
>     }
>     void mergeVisibility(LinkageInfo Other) {
>
> Modified: cfe/trunk/test/CodeGenCXX/visibility.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/visibility.cpp?rev=155102&r1=155101&r2=155102&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGenCXX/visibility.cpp (original)
> +++ cfe/trunk/test/CodeGenCXX/visibility.cpp Thu Apr 19 00:34:51 2012
> @@ -510,7 +510,7 @@
>   };
>   template class foo::bar<zed>;
>   // CHECK: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv
> -  // CHECK-HIDDEN: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv
> +  // CHECK-HIDDEN: define weak_odr hidden void @_ZN7PR101133foo3barINS_3zedEE3zedEv

which isn't all that surprising since you're changing the test
expectation of a test we added when we made it work. Why did you make
this change? Can you revert it again, please? (The component build
works fine with gcc 4.4, and I believe 4.6, and it used to work fine
in clang up until this revision).

Nico

>  }
>
>  namespace PR11690 {
> @@ -541,7 +541,7 @@
>   };
>   template class foo::zed<baz>;
>   // CHECK: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
> -  // CHECK-HIDDEN: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
> +  // CHECK-HIDDEN: define weak_odr hidden void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
>  }
>
>  namespace test23 {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list