aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2004-08-16 13:54:43 -0700
committerDevang Patel <dpatel@gcc.gnu.org>2004-08-16 13:54:43 -0700
commit8e3e233be0d6e50fcfc1da2c81ad5eb51d974baa (patch)
tree58140b66c92905176d0b282d72e2e415ec6301bb /gcc/tree.h
parent580b3958265f6bca27126b24f20d95c32d00c854 (diff)
downloadgcc-8e3e233be0d6e50fcfc1da2c81ad5eb51d974baa.zip
gcc-8e3e233be0d6e50fcfc1da2c81ad5eb51d974baa.tar.gz
gcc-8e3e233be0d6e50fcfc1da2c81ad5eb51d974baa.tar.bz2
c-common.c (handle_used_attribute): Set DECL_PRESERVE_P.
* c-common.c (handle_used_attribute): Set DECL_PRESERVE_P. * print-tree.c (print_node): Print DECL_PRESERVE_P. * target-def.h (TARGET_ASM_MARK_DECL_PRESERVED): New #define. (TARGET_ASM_OUT): New member, TARGET_ASM_MARK_DECL_PRESERVED * target.h (struct gcc_target): New member, mark_decl_preserved. * hooks.c (hook_void_charptr): Rename to ... (hook_void_constcharptr): ... new name. * hooks.h (hook_void_charptr): Rename to .. (hook_void_constcharptr): ... new name. * tree.h (DECL_PRESERVE_P): New #define. (struct tree_decl): New member, preserve_flag. * varasm.c (assemble_start_function): Mark decl preserved. (assemble_variable): Same. * darwin.c (darwin_mark_decl_preserved): New function. * darwin.h (TARGET_ASM_MARK_DECL_preserved): New #define. * darwin-protos.h (darwin_mark_decl_preserved): New decl. * doc/tm.texi (TARGET_ASM_MARK_DECL_PRESERVED): Document. testsuite: * gcc.dg/darwin-20040809-1.c: New test. From-SVN: r86076
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index a0cc136..ff03d9c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2165,6 +2165,11 @@ struct tree_binfo GTY (())
#define DECL_POSSIBLY_INLINED(DECL) \
FUNCTION_DECL_CHECK (DECL)->decl.possibly_inlined
+/* Nonzero for a decl that is decorated using attribute used.
+ This indicates compiler tools that this decl needs to be preserved. */
+#define DECL_PRESERVE_P(DECL) \
+ DECL_CHECK (DECL)->decl.preserve_flag
+
/* Enumerate visibility settings. */
#ifndef SYMBOL_VISIBILITY_DEFINED
#define SYMBOL_VISIBILITY_DEFINED
@@ -2232,7 +2237,8 @@ struct tree_decl GTY(())
unsigned lang_flag_7 : 1;
unsigned possibly_inlined : 1;
- /* 15 unused bits. */
+ unsigned preserve_flag: 1;
+ /* 13 unused bits. */
union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is