From eb37fcdcde98d0bdd7fc2878299ca7ec0fbddde7 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 30 May 2017 07:35:23 +0000 Subject: [PATCH] Remove dump_file_info::dump_file_info and replace it with macro. 2017-05-30 Martin Liska * dumpfile.c: Use newly added macro DUMP_FILE_INFO. * dumpfile.h (struct dump_file_info): Remove ctors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248617 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/dumpfile.c | 42 ++++++++++++++---------------------------- gcc/dumpfile.h | 7 ------- 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d96900407cf..2475e7afbc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2017-05-30 Martin Liska + * dumpfile.c: Use newly added macro DUMP_FILE_INFO. + * dumpfile.h (struct dump_file_info): Remove ctors. + +2017-05-30 Martin Liska + * predict.def: Fix GNU coding style. 2017-05-29 Max Filippov diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 233e6b19916..b8bda3c9183 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -47,41 +47,27 @@ FILE *alt_dump_file = NULL; const char *dump_file_name; dump_flags_t dump_flags; -CONSTEXPR dump_file_info::dump_file_info (): suffix (NULL), swtch (NULL), - glob (NULL), pfilename (NULL), alt_filename (NULL), pstream (NULL), - alt_stream (NULL), dkind (DK_none), pflags (), alt_flags (0), - optgroup_flags (0), pstate (0), alt_state (0), num (0), owns_strings (false), - graph_dump_initialized (false) -{ -} - -dump_file_info::dump_file_info (const char *_suffix, const char *_swtch, - dump_kind _dkind, int _num): - suffix (_suffix), swtch (_swtch), glob (NULL), - pfilename (NULL), alt_filename (NULL), pstream (NULL), alt_stream (NULL), - dkind (_dkind), pflags (), alt_flags (0), optgroup_flags (0), - pstate (0), alt_state (0), num (_num), owns_strings (false), - graph_dump_initialized (false) -{ -} +#define DUMP_FILE_INFO(suffix, swtch, dkind, num) \ + {suffix, swtch, NULL, NULL, NULL, NULL, NULL, dkind, 0, 0, 0, 0, 0, num, \ + false, false} /* Table of tree dump switches. This must be consistent with the TREE_DUMP_INDEX enumeration in dumpfile.h. */ static struct dump_file_info dump_files[TDI_end] = { - dump_file_info (), - dump_file_info (".cgraph", "ipa-cgraph", DK_ipa, 0), - dump_file_info (".type-inheritance", "ipa-type-inheritance", DK_ipa, 0), - dump_file_info (".ipa-clones", "ipa-clones", DK_ipa, 0), - dump_file_info (".original", "tree-original", DK_tree, 3), - dump_file_info (".gimple", "tree-gimple", DK_tree, 4), - dump_file_info (".nested", "tree-nested", DK_tree, 5), + DUMP_FILE_INFO (NULL, NULL, DK_none, 0), + DUMP_FILE_INFO (".cgraph", "ipa-cgraph", DK_ipa, 0), + DUMP_FILE_INFO (".type-inheritance", "ipa-type-inheritance", DK_ipa, 0), + DUMP_FILE_INFO (".ipa-clones", "ipa-clones", DK_ipa, 0), + DUMP_FILE_INFO (".original", "tree-original", DK_tree, 3), + DUMP_FILE_INFO (".gimple", "tree-gimple", DK_tree, 4), + DUMP_FILE_INFO (".nested", "tree-nested", DK_tree, 5), #define FIRST_AUTO_NUMBERED_DUMP 3 - dump_file_info (NULL, "lang-all", DK_lang, 0), - dump_file_info (NULL, "tree-all", DK_tree, 0), - dump_file_info (NULL, "rtl-all", DK_rtl, 0), - dump_file_info (NULL, "ipa-all", DK_ipa, 0), + DUMP_FILE_INFO (NULL, "lang-all", DK_lang, 0), + DUMP_FILE_INFO (NULL, "tree-all", DK_tree, 0), + DUMP_FILE_INFO (NULL, "rtl-all", DK_rtl, 0), + DUMP_FILE_INFO (NULL, "ipa-all", DK_ipa, 0), }; /* Define a name->number mapping for a dump flag value. */ diff --git a/gcc/dumpfile.h b/gcc/dumpfile.h index a60777f344d..fda8d712c43 100644 --- a/gcc/dumpfile.h +++ b/gcc/dumpfile.h @@ -120,13 +120,6 @@ typedef uint64_t dump_flags_t; /* Define a tree dump switch. */ struct dump_file_info { - /* Constructor. */ - CONSTEXPR dump_file_info (); - - /* Constructor. */ - dump_file_info (const char *_suffix, const char *_swtch, dump_kind _dkind, - int _num); - /* Suffix to give output file. */ const char *suffix; /* Command line dump switch. */ -- 2.11.4.GIT