summaryrefslogtreecommitdiff
path: root/gcc/langhooks-def.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-07 06:03:17 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-07 06:03:17 +0000
commit295e387a04a57eea2a4932d20328369452399388 (patch)
tree85a5a4cad3cfe432c546c4df2134dac37924265c /gcc/langhooks-def.h
parent6fcaa06776757d517ee0abf333c03d431e182bea (diff)
downloadgcc-295e387a04a57eea2a4932d20328369452399388.tar.gz
* tree.c (tree_size): For all 'c' and 'x' nodes, look directly
at the sizes of the relevant structures, rather than relying on TREE_CODE_LENGTH. Call lang_hooks.tree_size to get the sizes of any such we don't know about. Use lang_hooks.identifier_size for IDENTIFIER_NODE. (initializer_zerop): Use CONSTRUCTOR_ELTS. * tree.def: Update commentary. Make fourth element of the definition for all 'c' and 'x' nodes zero. * langhooks.h: New hook, tree_size / LANG_HOOKS_TREE_SIZE. * langhooks-def.h: Update to match. * langhooks.c: New default, lhd_tree_size. * c-common.def (SRCLOC): Kill. * c-pretty-print.c (pp_c_postfix_expression [case SRCLOC]): Remove entirely - was already #if-ed out. ada: * ada-tree.def: Make fourth element for GNAT_LOOP_ID zero. * misc.c (gnat_tree_size): New function. (LANG_HOOKS_TREE_SIZE): Override. cp: * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero. * cp-lang.c (cp_tree_size): New function. (LANG_HOOKS_TREE_SIZE): Override. * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill. (union lang_tree_node): Remove common and srcloc members. (build_srcloc_here): Don't prototype. * decl.c (cp_tree_node_structure): Kill SRCLOC case. * pt.c (pending_templates): Correct comment. * tree.c (build_srcloc, build_srcloc_here): Kill. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r--gcc/langhooks-def.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 4315eab91e7..1c2244a6276 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -65,6 +65,7 @@ extern bool lhd_warn_unused_global_decl PARAMS ((tree));
extern void lhd_incomplete_type_error PARAMS ((tree, tree));
extern tree lhd_type_promotes_to PARAMS ((tree));
extern tree lhd_expr_size PARAMS ((tree));
+extern size_t lhd_tree_size PARAMS ((enum tree_code));
/* Declarations of default tree inlining hooks. */
tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
@@ -116,6 +117,7 @@ void write_global_declarations PARAMS ((void));
#define LANG_HOOKS_PRINT_ERROR_FUNCTION lhd_print_error_function
#define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name
#define LANG_HOOKS_EXPR_SIZE lhd_expr_size
+#define LANG_HOOKS_TREE_SIZE lhd_tree_size
#define LANG_HOOKS_FUNCTION_INIT lhd_do_nothing_f
#define LANG_HOOKS_FUNCTION_FINAL lhd_do_nothing_f
@@ -238,6 +240,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
#define LANG_HOOKS_INITIALIZER { \
LANG_HOOKS_NAME, \
LANG_HOOKS_IDENTIFIER_SIZE, \
+ LANG_HOOKS_TREE_SIZE, \
LANG_HOOKS_INIT_OPTIONS, \
LANG_HOOKS_DECODE_OPTION, \
LANG_HOOKS_POST_OPTIONS, \