]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/dumpfile.c
Simplify dump_context by adding a dump_loc member function
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 31 Jul 2018 16:51:17 +0000 (16:51 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 31 Jul 2018 16:51:17 +0000 (16:51 +0000)
commit1d8693a0ce9e805acadc11072579e94b913eb1d8
treea6a8d08caf29dbc5de626f399e74cde39c0d703f
parent8e73e6140d876c6ae8e1d67bb4dcd2e47c7914ec
Simplify dump_context by adding a dump_loc member function

This patch removes some duplicated code in dumpfile.c by
reimplementing the various dump_foo_loc calls in terms of dump_foo.

gcc/ChangeLog:
* dump-context.h (dump_context::dump_loc): New decl.
* dumpfile.c (dump_context::dump_loc): New member function.
(dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
and dump_gimple_stmt.
(dump_context::dump_gimple_expr_loc): Likewise, using
dump_gimple_expr.
(dump_context::dump_generic_expr_loc): Likewise, using
dump_generic_expr.
(dump_context::dump_printf_loc_va): Likewise, using
dump_printf_va.
(dump_context::begin_scope): Explicitly using the global function
"dump_loc", rather than the member function.

From-SVN: r263167
gcc/ChangeLog
gcc/dump-context.h
gcc/dumpfile.c