summaryrefslogtreecommitdiff
path: root/gcc/gengtype.h
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2010-11-25 19:03:27 +0000
committerBasile Starynkevitch <bstarynk@gcc.gnu.org>2010-11-25 19:03:27 +0000
commit92724e1d707ea2821c9a94517ba3b830f84eb296 (patch)
treee0e8eaea81b8a2157370fd1822a8fd68c29a5a3b /gcc/gengtype.h
parentf759884521f40179bd1296c5a4f30fd3b6a378ce (diff)
downloadgcc-92724e1d707ea2821c9a94517ba3b830f84eb296.tar.gz
gentype-state.c: Add new file.
2010-11-25 Basile Starynkevitch <basile@starynkevitch.net> Jeremie Salvucci <jeremie.salvucci@free.fr> * gentype-state.c: Add new file. * gengtype.c (type count): New variable. (new_structure, find_param_structure, create_pointer) (create_array): Use it to set state_number in types. (dump_everything): Improve comment. (main): Call read_state and write_state. Print type_count. * gengtype.h (type_lineloc): New function. (read_state, write_state): New declarations. * Makefile.in (GENGTYPE_FLAGS): New variable. (s-gtype): Run gengtype twice and generate gtype.state. (build/gengtype-state.o): New rule. (build/gengtype$(build_exeext)): Link gengtype-state.o. (mostlyclean): Update comment. Remove gtype.state. Co-Authored-By: Jeremie Salvucci <jeremie.salvucci@free.fr> From-SVN: r167150
Diffstat (limited to 'gcc/gengtype.h')
-rw-r--r--gcc/gengtype.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index 2046e40d6e9..136ab61fe75 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -374,6 +374,13 @@ extern size_t srcdir_len;
extern const char *read_state_filename; /* (-r) program argument. */
extern const char *write_state_filename; /* (-w) program argument. */
+/* Functions reading and writing the entire gengtype state, called from
+ main, and implemented in file gengtype-state.c. */
+void read_state (const char* path);
+/* Write the state, and update the state_number field in types. */
+void write_state (const char* path);
+
+
/* Print an error message. */
extern void error_at_line
(const struct fileloc *pos, const char *msg, ...) ATTRIBUTE_PRINTF_2;