diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-10-08 20:54:07 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-10-08 20:54:07 +0000 |
commit | 69dcadffbabaf5fd3b0fa3f14b5de097c40a2751 (patch) | |
tree | f37df892d870d138dc0e3460f96264fd2648883e /gcc/toplev.h | |
parent | 19551f2985c293a1041a0e7755627e87eb1559b7 (diff) | |
download | gcc-69dcadffbabaf5fd3b0fa3f14b5de097c40a2751.tar.gz |
langhooks.h: New file.
* langhooks.h: New file.
* Makefile.in (OBJS): Added langhooks.o.
(c-lang.o): Depend on langhooks.h.
(c-common.o): Don't depend on tree-inline.h.
(tree-inline.o): Depend on toplev.h.
(langhooks.o): New rule.
* c-common.c: Don't include tree-inline.h.
(c_mark_lang_decl): Mark argument c as unused.
(c_common_lang_init): Don't initialize hooks here.
* c-lang.c: Include langhooks.h, then override some macros.
(lang_hooks): Initialize with macros in langhooks.h.
(c_init): Don't initialize hooks here.
* toplev.c (struct lang_hooks_for_tree_inlining): New struct.
(struct lang_hooks): Add tree_inlining. Refer to langhooks.h.
* tree-inline.c: Include toplev.h. Don't define hook variables.
* tree-inline.h: Don't define hook types nor declare hook
variables. Move macros to...
* langhooks.c: ... new file, as functions. Adjust all callers.
From-SVN: r46096
Diffstat (limited to 'gcc/toplev.h')
-rw-r--r-- | gcc/toplev.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/toplev.h b/gcc/toplev.h index 860d49bd9d7..72fa2fd640a 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -115,7 +115,31 @@ extern void check_global_declarations PARAMS ((union tree_node **, int)); extern const char *progname; extern const char *dump_base_name; +/* The following hooks are documented in langhooks.c. Must not be + NULL. */ + +struct lang_hooks_for_tree_inlining +{ + union tree_node *(*walk_subtrees) PARAMS ((union tree_node **, int *, + union tree_node *(*) + (union tree_node **, + int *, void *), + void *, void *)); + int (*cannot_inline_tree_fn) PARAMS ((union tree_node **)); + int (*disregard_inline_limits) PARAMS ((union tree_node *)); + union tree_node *(*add_pending_fn_decls) PARAMS ((void*, union tree_node *)); + int (*tree_chain_matters_p) PARAMS ((union tree_node *)); + int (*auto_var_in_fn_p) PARAMS ((union tree_node *, union tree_node *)); + union tree_node *(*copy_res_decl_for_inlining) PARAMS ((union tree_node *, + union tree_node *, + union tree_node *, + void *, int *, + void *)); + int (*anon_aggr_type_p) PARAMS ((union tree_node *)); +}; + /* Language-specific hooks. Can be NULL unless otherwise specified. */ + struct lang_hooks { /* Called first, to initialize the front end. */ @@ -141,6 +165,11 @@ struct lang_hooks /* Called when all command line options have been processed. */ void (*post_options) PARAMS ((void)); + + struct lang_hooks_for_tree_inlining tree_inlining; + + /* Whenever you add entries here, make sure you adjust langhooks.h + and langhooks.c accordingly. */ }; /* Each front end provides its own. */ |