Simplify dump_context by adding a dump_loc member function
commit291c13cb1a1b11c79ac20c0d2d722c123c3cd8e6
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 16:51:17 +0000 (31 16:51 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 16:51:17 +0000 (31 16:51 +0000)
treea6a8d08caf29dbc5de626f399e74cde39c0d703f
parentb28cf1b0833df0850bb862aaf093fafb7babe400
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263167 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dump-context.h
gcc/dumpfile.c