summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-26 21:17:22 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-26 21:17:22 +0000
commitb4cf9ec1b3186614f2a781fa2ed60b7186d09aa9 (patch)
treebf177b7375ac3fceb1bd51f1f20b2ff845e3fbba /gcc/tree.h
parent7e03286092d39bb21446e09602b7bf37f312a2c0 (diff)
downloadgcc-b4cf9ec1b3186614f2a781fa2ed60b7186d09aa9.tar.gz
* attribs.c (c_common_attribute_table): Add visibility.
(handle_visibility_attribute): New function. * varasm.c (assemble_visibility): New function. * output.h (assemble_visibility): Add prototype. * tree.h (MODULE_LOCAL_P): Define. * crtstuff.c (__dso_handle): Use visibility attribute. * config/i386/i386.h (ENCODE_SECTION_INFO): Set SYMBOL_REF_FLAG for MODULE_LOCAL_P symbols too. * config/ia64/ia64.c (ia64_encode_section_info): Handle MODULE_LOCAL_P symbols the same way as local symbols. Add SDATA_NAME_FLAG_CHAR even if decl was explicitely forced into .sdata/.sbss by the user. * doc/extend.texi (Function Attributes): Document visibility attribute. * gcc.dg/ia64-visibility-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 89bff7e09da..8e17b534225 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2283,6 +2283,11 @@ extern tree merge_attributes PARAMS ((tree, tree));
extern tree merge_dllimport_decl_attributes PARAMS ((tree, tree));
#endif
+/* Return true if DECL will be always resolved to a symbol defined in the
+ same module (shared library or program). */
+#define MODULE_LOCAL_P(DECL) \
+ (lookup_attribute ("visibility", DECL_ATTRIBUTES (DECL)) != NULL)
+
/* Return a version of the TYPE, qualified as indicated by the
TYPE_QUALS, if one exists. If no qualified version exists yet,
return NULL_TREE. */