diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-22 12:37:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-22 12:37:27 +0000 |
commit | 51183374a54448c54f1b53035cea5b8d885c1c82 (patch) | |
tree | 6ae5fa1e2f89090ef0455ab1566052eb835b5d52 | |
parent | dd26998c1fb44b7c74a0434fd61e63542fc1745a (diff) |
Revert 155102 but add a fixme while I debug what is wrong with chrome's
components build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155314 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Decl.h | 10 | ||||
-rw-r--r-- | test/CodeGenCXX/visibility.cpp | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 4dff03ed51..55464d4044 100644 --- a/include/clang/AST/Decl.h +++ b/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/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp index c73f3f7164..f309f3fc34 100644 --- a/test/CodeGenCXX/visibility.cpp +++ b/test/CodeGenCXX/visibility.cpp @@ -536,7 +536,9 @@ namespace PR10113 { }; template class foo::bar<zed>; // 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<baz>; // 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 { |