aboutsummaryrefslogtreecommitdiff
path: root/gcc/gengtype.h
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2011-04-19 09:45:18 +0000
committerBasile Starynkevitch <basile@starynkevitch.net>2011-04-19 09:45:18 +0000
commit1059d094c380517f5e8182f8028396e989f8db2d (patch)
treef427734c80d0948a238a706be5a77352265369e2 /gcc/gengtype.h
parent71433c0ab225e866d8907c3bc931c887f1cdd693 (diff)
2011-04-19 Basile Starynkevitch <basile@starynkevitch.net>
* gengtype.h: Updated copyright year. (struct input_file_st): Add inpisplugin field. (type_fileloc): New function. * gengtype.c (write_typed_struct_alloc_def): Add gcc_assert. (write_typed_alloc_defns): Ditto. Don't output for plugin files. (write_typed_alloc_defns): Don't output for plugin files. (input_file_by_name): Clear inpisplugin field. (main): Set inpisplugin field for plugin files. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@172705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengtype.h')
-rw-r--r--gcc/gengtype.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index 136ab61fe75..964cc311917 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -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
{