summaryrefslogtreecommitdiff
path: root/gcc/cp/dump.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-05 08:03:45 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-05 08:03:45 +0000
commit364c0b8289357c301c31ac9ef0a03c447189e181 (patch)
treeb6681bcaabfa37891f4e13f70111f31f94d5e53e /gcc/cp/dump.c
parent35c15f51aaef1d494133a35dfb431a2b055cc5ff (diff)
downloadgcc-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/cp/dump.c')
-rw-r--r--gcc/cp/dump.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index 6706ebf657b..4826585c11d 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -101,19 +101,20 @@ cp_dump_tree (di, t)
}
dump_child ("vfld", TYPE_VFIELD (t));
-
- {
- int i;
-
- for (i = 0; i < CLASSTYPE_N_BASECLASSES (t); ++i)
- {
- tree base_binfo = BINFO_BASETYPE (TYPE_BINFO (t), i);
- dump_child ("base", BINFO_TYPE (base_binfo));
- if (TREE_VIA_VIRTUAL (base_binfo))
- dump_string (di, "virtual");
- dump_access (di, base_binfo);
- }
- }
+
+ if (!dump_flag (di, TDF_SLIM, t))
+ {
+ int i;
+
+ for (i = 0; i < CLASSTYPE_N_BASECLASSES (t); ++i)
+ {
+ tree base_binfo = BINFO_BASETYPE (TYPE_BINFO (t), i);
+ dump_child ("base", BINFO_TYPE (base_binfo));
+ if (TREE_VIA_VIRTUAL (base_binfo))
+ dump_string (di, "virtual");
+ dump_access (di, base_binfo);
+ }
+ }
break;
case FIELD_DECL:
@@ -163,7 +164,7 @@ cp_dump_tree (di, t)
break;
if (DECL_NAMESPACE_ALIAS (t))
dump_child ("alis", DECL_NAMESPACE_ALIAS (t));
- else
+ else if (!dump_flag (di, TDF_SLIM, t))
dump_child ("dcls", cp_namespace_decls (t));
break;