diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-05 08:03:45 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-05 08:03:45 +0000 |
commit | 364c0b8289357c301c31ac9ef0a03c447189e181 (patch) | |
tree | b6681bcaabfa37891f4e13f70111f31f94d5e53e /gcc/c-common.h | |
parent | 35c15f51aaef1d494133a35dfb431a2b055cc5ff (diff) | |
download | gcc-364c0b8289357c301c31ac9ef0a03c447189e181.tar.gz |
* c-common.h (flag_dump_translation_unit): Remove.
(enum tree_dump_index): Define.
(TDF_ADDRESS, TDF_SLIM): New #defines.
(dump_node_to_file): Remove.
(dump_node): Make extern. Add flags.
(dump_flag, dump_enabled_p, dump_begin, dump_end,
dump_switch_p): Prototype.
* c-common.c (flag_dump_translation_unit): Remove.
* c-decl.c (c_decode_option): Remove -fdump-translation-unit
logic. Use dump_switch_p.
* c-dump.h (struct dump_info): Add node and user fields.
(dump_pointer): Declare.
* c-dump.c (dump_node): Make extern. Add flags.
(SOL_COLUMN, EOL_COLUMN, COLUMN_ALIGNMENT): New #defines.
(dump_new_line, dump_maybe_newline): Use them.
(dump_pointer): New function.
(dequeue_and_dump): Check TDF_SLIM before dumping a _DECL's
chain or function's body. Dump address, if TDF_ADDRESS set.
(dump_flag): Define.
(dump_node_to_file): Remove.
(struct dump_file_info): New struct.
(dump_files): New array.
(dump_begin, dump_end, dump_enabled_p, dump_switch_p): Define.
* c-lang.c (finish_file): Adjust dumping.
* toplev.h (dump_base_name): Make extern.
* invoke.texi: Document new flags.
cp:
* class.c (maybe_indent_hierarchy): New function.
(dump_class_hierarchy_r): Add flags. Dump extra binfo
information, if enabled. Use maybe_indent_hierarchy. Adjust
output format.
(dump_class_hierarchy): Adjust prototype. Adjust output format.
(dump_array, dump_vtable, dump_vtt): New functions.
(finish_struct_1): Adjust hierarchy dumping.
(initialize_vtable): Call dump_vtable.
(build_vtt): Call dump_vtt.
(build_ctor_vtbl_group): Call dump_vtable.
* decl2.c (flag_dump_class_layout): Remove.
(cxx_decode_option): Remove dump translation unit
and dump class hierarchy check. Call dump_switch_p.
(finish_file): Adjust dumping.
(dump.c): Only dump base classes if not TDF_SLIM.
Only dump namespace members if not TDF_SLIM.
* optimize.c (dump_function): New function.
(optimize_function): Call dump_function.
* semantics.c (expand_body): Use dump_enabled_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42896 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 8625c913838..3f766a7a179 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -427,11 +427,6 @@ extern int flag_no_builtin; extern int flag_no_nonansi_builtin; -/* If non-NULL, dump the tree structure for the entire translation - unit to this file. */ - -extern const char *flag_dump_translation_unit; - /* Nonzero means warn about suggesting putting in ()'s. */ extern int warn_parentheses; @@ -811,6 +806,20 @@ extern int c_unsafe_for_reeval PARAMS ((tree)); /* In dump.c */ +/* Different tree dump places. */ +enum tree_dump_index +{ + TDI_all, /* dump the whole translation unit */ + TDI_original, /* dump each function before optimizing it */ + TDI_optimized, /* dump each function after optimizing it */ + TDI_class, /* dump class heirarchy */ + TDI_end +}; + +/* Bit masks to control tree dumping. */ +#define TDF_ADDRESS (1 << 0) /* dump node addresses */ +#define TDF_SLIM (1 << 1) /* don't go wild following links */ + typedef struct dump_info *dump_info_p; /* A callback function used dump language-specific parts of tree @@ -821,7 +830,12 @@ typedef int (*dump_tree_fn) PARAMS ((dump_info_p, tree)); extern dump_tree_fn lang_dump_tree; -extern void dump_node_to_file PARAMS ((tree, const char *)); +extern int dump_flag PARAMS ((dump_info_p, int, tree)); +extern int dump_enabled_p PARAMS ((enum tree_dump_index)); +extern FILE *dump_begin PARAMS ((enum tree_dump_index, int *)); +extern void dump_end PARAMS ((enum tree_dump_index, FILE *)); +extern void dump_node PARAMS ((tree, int, FILE *)); +extern int dump_switch_p PARAMS ((const char *)); /* Information recorded about each file examined during compilation. */ |