From 6b6e879221230aeaf6c17acb9193d0a5ab4db14d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 22 Apr 2012 12:37:27 +0000 Subject: [PATCH] Revert 155102 but add a fixme while I debug what is wrong with chrome's components build. llvm-svn: 155314 --- clang/include/clang/AST/Decl.h | 10 ++++++++-- clang/test/CodeGenCXX/visibility.cpp | 8 ++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 4dff03ed5199..55464d4044ec 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -277,10 +277,16 @@ public: if (visibility() < V) return; - // Don't lose the explicit bit for nothing - if (visibility() == V && visibilityExplicit()) + // FIXME: this + // If this visibility is explicit, keep it. + if (visibilityExplicit() && !E) return; + // should be replaced with this + // Don't lose the explicit bit for nothing + // if (visibility() == V && visibilityExplicit()) + // return; + setVisibility(V, E); } void mergeVisibility(LinkageInfo Other) { diff --git a/clang/test/CodeGenCXX/visibility.cpp b/clang/test/CodeGenCXX/visibility.cpp index c73f3f716425..f309f3fc3498 100644 --- a/clang/test/CodeGenCXX/visibility.cpp +++ b/clang/test/CodeGenCXX/visibility.cpp @@ -536,7 +536,9 @@ namespace PR10113 { }; template class foo::bar; // CHECK: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv - // CHECK-HIDDEN: define weak_odr hidden void @_ZN7PR101133foo3barINS_3zedEE3zedEv + + // FIXME: This should be hidden as zed is hidden. + // CHECK-HIDDEN: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv } namespace PR11690 { @@ -567,7 +569,9 @@ namespace PR11690_2 { }; template class foo::zed; // CHECK: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv - // CHECK-HIDDEN: define weak_odr hidden void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv + + // FIXME: This should be hidden as baz is hidden. + // CHECK-HIDDEN: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv } namespace test23 {