commit 3e01e07381cdb16727fe67777011202372ebcdfc
Author: Jason Merrill <jason@redhat.com>
Date: Thu Oct 27 17:44:39 2011 -0400
cleanup
@@ -2178,7 +2178,8 @@ determine_visibility (tree decl)
if (!DECL_VISIBILITY_SPECIFIED (decl))
{
- if (!DECL_VISIBILITY_SPECIFIED (pattern) && determine_hidden_inline (decl))
+ if (!DECL_VISIBILITY_SPECIFIED (pattern)
+ && determine_hidden_inline (decl))
DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
else
{
@@ -2265,18 +2266,21 @@ determine_visibility_from_class (tree decl, tree class_type)
targetm.cxx.determine_class_data_visibility (decl);
}
+/* Returns true iff DECL is an inline that should get hidden visibility
+ because of -fvisibility-inlines-hidden. */
+
static bool
determine_hidden_inline (tree decl)
{
return (visibility_options.inlines_hidden
- /* Don't do this for inline templates; specializations might not be
- * inline, and we don't want them to inherit the hidden
- * visibility. We'll set it here for all inline instantiations. */
- && !processing_template_decl
- && TREE_CODE (decl) == FUNCTION_DECL
- && DECL_DECLARED_INLINE_P (decl)
- && (! DECL_LANG_SPECIFIC (decl)
- || ! DECL_EXPLICIT_INSTANTIATION (decl)));
+ /* Don't do this for inline templates; specializations might not be
+ inline, and we don't want them to inherit the hidden
+ visibility. We'll set it here for all inline instantiations. */
+ && !processing_template_decl
+ && TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_DECLARED_INLINE_P (decl)
+ && (! DECL_LANG_SPECIFIC (decl)
+ || ! DECL_EXPLICIT_INSTANTIATION (decl)));
}
/* Constrain the visibility of a class TYPE based on the visibility of its