diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/dump-context.h | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/dump-context.h')
-rw-r--r-- | gcc/dump-context.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/dump-context.h b/gcc/dump-context.h index 347477f..3f72cc9 100644 --- a/gcc/dump-context.h +++ b/gcc/dump-context.h @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see class optrecord_json_writer; namespace selftest { class temp_dump_context; } +class debug_dump_context; /* A class for handling the various dump_* calls. @@ -42,6 +43,7 @@ namespace selftest { class temp_dump_context; } class dump_context { friend class selftest::temp_dump_context; + friend class debug_dump_context; public: static dump_context &get () { return *s_current; } @@ -195,6 +197,25 @@ private: auto_vec<stashed_item> m_stashed_items; }; +/* An RAII-style class for use in debug dumpers for temporarily using a + different dump_context. It enables full details and outputs to + stderr instead of the currently active dump_file. */ + +class debug_dump_context +{ + public: + debug_dump_context (); + ~debug_dump_context (); + + private: + dump_context m_context; + dump_context *m_saved; + dump_flags_t m_saved_flags; + dump_flags_t m_saved_pflags; + FILE *m_saved_file; +}; + + #if CHECKING_P namespace selftest { |