OSDN Git Service

* dwarf2out.c (gen_compile_unit_die): Use DW_LANG_Go for Go.
[pf3gnuchains/gcc-fork.git] / gcc / gengtype.h
index 2046e40..964cc31 100644 (file)
@@ -1,5 +1,5 @@
 /* Process source files and output type information.
-   Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010 
+   Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010, 2011 
    Free Software Foundation, Inc.
 
    This file is part of GCC.
@@ -33,6 +33,7 @@ struct input_file_st
   struct outf* inpoutf;  /* Cached corresponding output file, computed
                             in get_output_file_with_visibility.  */
   lang_bitmap inpbitmap; /* The set of languages using this file.  */
+  bool inpisplugin;      /* Flag set for plugin input files.  */
   char inpname[1];       /* A variable-length array, ended by a null
                             char.  */
 };
@@ -328,6 +329,19 @@ extern struct type scalar_char;
 
 
 
+/* Give the file location of a type, if any. */
+static inline struct fileloc* 
+type_fileloc (type_p t)
+{
+  if (!t) 
+    return NULL;
+  if (UNION_OR_STRUCT_P(t))
+    return &t->u.s.line;
+  if  (t->kind == TYPE_PARAM_STRUCT)
+    return &t->u.param_struct.line;
+  return NULL;
+}
+
 /* Structure representing an output file.  */
 struct outf
 {
@@ -374,6 +388,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;