diff options
author | David Malcolm <dmalcolm@redhat.com> | 2018-07-31 16:51:17 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2018-07-31 16:51:17 +0000 |
commit | 1d8693a0ce9e805acadc11072579e94b913eb1d8 (patch) | |
tree | a6a8d08caf29dbc5de626f399e74cde39c0d703f /gcc/dump-context.h | |
parent | 8e73e6140d876c6ae8e1d67bb4dcd2e47c7914ec (diff) | |
download | gcc-1d8693a0ce9e805acadc11072579e94b913eb1d8.zip gcc-1d8693a0ce9e805acadc11072579e94b913eb1d8.tar.gz gcc-1d8693a0ce9e805acadc11072579e94b913eb1d8.tar.bz2 |
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
Diffstat (limited to 'gcc/dump-context.h')
-rw-r--r-- | gcc/dump-context.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/dump-context.h b/gcc/dump-context.h index a191e3a..f6df0b4 100644 --- a/gcc/dump-context.h +++ b/gcc/dump-context.h @@ -39,6 +39,8 @@ class dump_context ~dump_context (); + void dump_loc (dump_flags_t dump_kind, const dump_location_t &loc); + void dump_gimple_stmt (dump_flags_t dump_kind, dump_flags_t extra_dump_flags, gimple *gs, int spc); |