diff options
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r-- | gcc/dumpfile.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index d9a84ff..ee967d8 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -33,10 +33,10 @@ along with GCC; see the file COPYING3. If not see #define skip_leading_substring(whole, part) \ (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) -static int pflags; /* current dump_flags */ -static int alt_flags; /* current opt_info flags */ +static dump_flags_t pflags; /* current dump_flags */ +static dump_flags_t alt_flags; /* current opt_info flags */ -static void dump_loc (int, FILE *, source_location); +static void dump_loc (dump_flags_t, FILE *, source_location); static FILE *dump_open_alternate_stream (struct dump_file_info *); /* These are currently used for communicating between passes. @@ -45,7 +45,7 @@ static FILE *dump_open_alternate_stream (struct dump_file_info *); FILE *dump_file = NULL; FILE *alt_dump_file = NULL; const char *dump_file_name; -int dump_flags; +dump_flags_t dump_flags; /* Table of tree dump switches. This must be consistent with the TREE_DUMP_INDEX enumeration in dumpfile.h. */ @@ -84,7 +84,7 @@ static struct dump_file_info dump_files[TDI_end] = struct dump_option_value_info { const char *const name; /* the name of the value */ - const int value; /* the value of the name */ + const dump_flags_t value; /* the value of the name */ }; /* Table of dump options. This must be consistent with the TDF_* flags @@ -181,7 +181,7 @@ gcc::dump_manager::~dump_manager () unsigned int gcc::dump_manager:: dump_register (const char *suffix, const char *swtch, const char *glob, - int flags, int optgroup_flags, + dump_flags_t flags, int optgroup_flags, bool take_ownership) { int num = m_next_dump++; @@ -327,7 +327,7 @@ dump_open_alternate_stream (struct dump_file_info *dfi) /* Print source location on DFILE if enabled. */ void -dump_loc (int dump_kind, FILE *dfile, source_location loc) +dump_loc (dump_flags_t dump_kind, FILE *dfile, source_location loc) { if (dump_kind) { @@ -346,7 +346,8 @@ dump_loc (int dump_kind, FILE *dfile, source_location loc) EXTRA_DUMP_FLAGS on the dump streams if DUMP_KIND is enabled. */ void -dump_gimple_stmt (int dump_kind, int extra_dump_flags, gimple *gs, int spc) +dump_gimple_stmt (dump_flags_t dump_kind, dump_flags_t extra_dump_flags, + gimple *gs, int spc) { if (dump_file && (dump_kind & pflags)) print_gimple_stmt (dump_file, gs, spc, dump_flags | extra_dump_flags); @@ -358,8 +359,8 @@ dump_gimple_stmt (int dump_kind, int extra_dump_flags, gimple *gs, int spc) /* Similar to dump_gimple_stmt, except additionally print source location. */ void -dump_gimple_stmt_loc (int dump_kind, source_location loc, int extra_dump_flags, - gimple *gs, int spc) +dump_gimple_stmt_loc (dump_flags_t dump_kind, source_location loc, + dump_flags_t extra_dump_flags, gimple *gs, int spc) { if (dump_file && (dump_kind & pflags)) { @@ -378,7 +379,8 @@ dump_gimple_stmt_loc (int dump_kind, source_location loc, int extra_dump_flags, DUMP_KIND is enabled. */ void -dump_generic_expr (int dump_kind, int extra_dump_flags, tree t) +dump_generic_expr (dump_flags_t dump_kind, dump_flags_t extra_dump_flags, + tree t) { if (dump_file && (dump_kind & pflags)) print_generic_expr (dump_file, t, dump_flags | extra_dump_flags); @@ -393,7 +395,7 @@ dump_generic_expr (int dump_kind, int extra_dump_flags, tree t) void dump_generic_expr_loc (int dump_kind, source_location loc, - int extra_dump_flags, tree t) + dump_flags_t extra_dump_flags, tree t) { if (dump_file && (dump_kind & pflags)) { @@ -411,7 +413,7 @@ dump_generic_expr_loc (int dump_kind, source_location loc, /* Output a formatted message using FORMAT on appropriate dump streams. */ void -dump_printf (int dump_kind, const char *format, ...) +dump_printf (dump_flags_t dump_kind, const char *format, ...) { if (dump_file && (dump_kind & pflags)) { @@ -433,7 +435,8 @@ dump_printf (int dump_kind, const char *format, ...) /* Similar to dump_printf, except source location is also printed. */ void -dump_printf_loc (int dump_kind, source_location loc, const char *format, ...) +dump_printf_loc (dump_flags_t dump_kind, source_location loc, + const char *format, ...) { if (dump_file && (dump_kind & pflags)) { @@ -462,7 +465,7 @@ dump_printf_loc (int dump_kind, source_location loc, const char *format, ...) int gcc::dump_manager:: -dump_start (int phase, int *flag_ptr) +dump_start (int phase, dump_flags_t *flag_ptr) { int count = 0; char *name; @@ -546,14 +549,14 @@ dump_finish (int phase) Multiple calls will reopen and append to the dump file. */ FILE * -dump_begin (int phase, int *flag_ptr) +dump_begin (int phase, dump_flags_t *flag_ptr) { return g->get_dumps ()->dump_begin (phase, flag_ptr); } FILE * gcc::dump_manager:: -dump_begin (int phase, int *flag_ptr) +dump_begin (int phase, dump_flags_t *flag_ptr) { char *name; struct dump_file_info *dfi; @@ -654,9 +657,9 @@ dump_end (int phase ATTRIBUTE_UNUSED, FILE *stream) int gcc::dump_manager:: -dump_enable_all (int flags, const char *filename) +dump_enable_all (dump_flags_t flags, const char *filename) { - int ir_dump_type = TDF_KIND (flags); + dump_flags_t ir_dump_type = TDF_KIND (flags); int n = 0; size_t i; @@ -711,7 +714,8 @@ dump_enable_all (int flags, const char *filename) int gcc::dump_manager:: -opt_info_enable_passes (int optgroup_flags, int flags, const char *filename) +opt_info_enable_passes (int optgroup_flags, dump_flags_t flags, + const char *filename) { int n = 0; size_t i; @@ -764,7 +768,7 @@ dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob) { const char *option_value; const char *ptr; - int flags; + dump_flags_t flags; if (doglob && !dfi->glob) return 0; @@ -863,7 +867,7 @@ dump_switch_p (const char *arg) and filename. Return non-zero if it is a recognized switch. */ static int -opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags, +opt_info_switch_p_1 (const char *arg, dump_flags_t *flags, int *optgroup_flags, char **filename) { const char *option_value; @@ -941,7 +945,7 @@ opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags, int opt_info_switch_p (const char *arg) { - int flags; + dump_flags_t flags; int optgroup_flags; char *filename; static char *file_seen = NULL; @@ -987,7 +991,7 @@ void dump_function (int phase, tree fn) { FILE *stream; - int flags; + dump_flags_t flags; stream = dump_begin (phase, &flags); if (stream) |