aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-05-30 09:35:23 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-05-30 07:35:23 +0000
commit63523736d018998672b707e669d0536d10cb735e (patch)
treeb27b868e0db12194dd12d7fb6d15d376bb1c623e /gcc/dumpfile.c
parent59075bc80894016c6f7fbf4b52bcd678601fce14 (diff)
downloadgcc-63523736d018998672b707e669d0536d10cb735e.zip
gcc-63523736d018998672b707e669d0536d10cb735e.tar.gz
gcc-63523736d018998672b707e669d0536d10cb735e.tar.bz2
Remove dump_file_info::dump_file_info and replace it with macro.
2017-05-30 Martin Liska <mliska@suse.cz> * dumpfile.c: Use newly added macro DUMP_FILE_INFO. * dumpfile.h (struct dump_file_info): Remove ctors. From-SVN: r248617
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 233e6b1..b8bda3c 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. */