diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-05-19 13:10:36 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-05-19 13:10:36 +0000 |
commit | 2a8a8d7bd28ef295b15f5b1c0cd17e73409c80a6 (patch) | |
tree | b57253306ce6fa1d70381c3429ede182b0b3d246 /gcc/cp/class.c | |
parent | a978134eac8ab9a3248405b4114cff2e957ed812 (diff) | |
download | gcc-2a8a8d7bd28ef295b15f5b1c0cd17e73409c80a6.zip gcc-2a8a8d7bd28ef295b15f5b1c0cd17e73409c80a6.tar.gz gcc-2a8a8d7bd28ef295b15f5b1c0cd17e73409c80a6.tar.bz2 |
toplev.c (general_init): Call register dump lang hook.
LANG_HOOK_REGISTER_DUMPS
gcc/
* toplev.c (general_init): Call register dump lang hook.
* doc/invoke.texi: Document -fdump-lang option family.
* dumpfile.c (dump_files): Remove class dump here.
(FIRST_AUTO_NUMBERED_DUMP): Adjust.
* dumpfile.h (tree_dump_index): Remove TDI_class.
* langhooks-def.h (lhd_register_dumps): Declare.
(LANG_HOOKS_REGISTER_DUMPS): Define.
(LANG_HOOKS_INITIALIZER): Add it.
* langhooks.c (lhd_register_dumps): Define.
* langhooks.h (struct lang_hooks): Add register_dumps.
c-family/
* c-opts.c (class_dump_file, class_dump_flags): Delete.
(c_common_parse_file): Remove class dump handling.
(get_dump_info): Likewise.
cp/
* class.c (class_dump_id): Define.
(dump_class_hierarchy, dump_vtable, dump_vtt): Use it.
* cp-objcp-common.c (cp_register_dumps): New.
* cp-objcp-common.h (cp_register_dumps): Declare.
(LANG_HOOKS_REGISTER_DUMPS): Override.
* cp-tree.h (class_dump_id): Declare.
testsuite/
* g++.dg/inherit/covariant7.C: Adjust.
From-SVN: r248271
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 6f3f3e6..c0eb945 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -37,6 +37,9 @@ along with GCC; see the file COPYING3. If not see #include "gimplify.h" #include "intl.h" +/* Id for dumping the class hierarchy. */ +int class_dump_id; + /* The number of nested classes being processed. If we are not in the scope of any class, this is zero. */ @@ -8914,11 +8917,10 @@ static void dump_class_hierarchy (tree t) { dump_flags_t flags; - FILE *stream = get_dump_info (TDI_class, &flags); - - if (stream) + if (FILE *stream = dump_begin (class_dump_id, &flags)) { dump_class_hierarchy_1 (stream, flags, t); + dump_end (class_dump_id, stream); } } @@ -8948,7 +8950,7 @@ static void dump_vtable (tree t, tree binfo, tree vtable) { dump_flags_t flags; - FILE *stream = get_dump_info (TDI_class, &flags); + FILE *stream = dump_begin (class_dump_id, &flags); if (!stream) return; @@ -8971,13 +8973,15 @@ dump_vtable (tree t, tree binfo, tree vtable) dump_array (stream, vtable); fprintf (stream, "\n"); } + + dump_end (class_dump_id, stream); } static void dump_vtt (tree t, tree vtt) { dump_flags_t flags; - FILE *stream = get_dump_info (TDI_class, &flags); + FILE *stream = dump_begin (class_dump_id, &flags); if (!stream) return; @@ -8989,6 +8993,8 @@ dump_vtt (tree t, tree vtt) dump_array (stream, vtt); fprintf (stream, "\n"); } + + dump_end (class_dump_id, stream); } /* Dump a function or thunk and its thunkees. */ |