diff gcc/genenums.c @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 561a7518be6b
children 84e7813d76e9
line wrap: on
line diff
--- a/gcc/genenums.c	Sun Aug 21 07:07:55 2011 +0900
+++ b/gcc/genenums.c	Fri Oct 27 22:46:09 2017 +0900
@@ -1,5 +1,5 @@
 /* Generate from machine description the strings for each enum.
-   Copyright (C) 2010  Free Software Foundation, Inc.
+   Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -21,6 +21,8 @@
 #include "system.h"
 #include "coretypes.h"
 #include "errors.h"
+#include "statistics.h"
+#include "vec.h"
 #include "read-md.h"
 
 /* Called via traverse_enum_types.  Emit an enum definition for
@@ -45,11 +47,12 @@
 }
 
 int
-main (int argc, char **argv)
+main (int argc, const char **argv)
 {
   progname = "genenums";
 
-  if (!read_md_files (argc, argv, NULL, NULL))
+  noop_reader reader;
+  if (!reader.read_md_files (argc, argv, NULL))
     return (FATAL_EXIT_CODE);
 
   puts ("/* Generated automatically by the program `genenums'");
@@ -58,7 +61,7 @@
   puts ("#include \"system.h\"\n");
   puts ("#include \"insn-constants.h\"\n");
 
-  traverse_enum_types (print_enum_type, 0);
+  reader.traverse_enum_types (print_enum_type, 0);
 
   if (ferror (stdout) || fflush (stdout) || fclose (stdout))
     return FATAL_EXIT_CODE;