Commit 84d2160d by Nathan Sidwell Committed by Nathan Sidwell

[dump] small source cleanup

https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01760.html
	* dumpfile.c (dump_begin): Reorder decls to use RAII.

From-SVN: r277415
parent 75c6a925
2019-10-24 Nathan Sidwell <nathan@acm.org>
* dumpfile.c (dump_begin): Reorder decls to use RAII.
2019-10-24 Martin Liska <mliska@suse.cz>
* symbol-summary.h (gt_pch_nx): Mark all functions
......@@ -1532,21 +1532,17 @@ FILE *
gcc::dump_manager::
dump_begin (int phase, dump_flags_t *flag_ptr, int part)
{
char *name;
struct dump_file_info *dfi;
FILE *stream;
if (phase == TDI_none || !dump_phase_enabled_p (phase))
return NULL;
name = get_dump_file_name (phase, part);
char *name = get_dump_file_name (phase, part);
if (!name)
return NULL;
dfi = get_dump_file_info (phase);
struct dump_file_info *dfi = get_dump_file_info (phase);
/* We do not support re-opening of dump files with parts. This would require
tracking pstate per part of the dump file. */
stream = dump_open (name, part != -1 || dfi->pstate < 0);
FILE *stream = dump_open (name, part != -1 || dfi->pstate < 0);
if (stream)
dfi->pstate = 1;
free (name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment