along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#ifdef GENERATOR_FILE
#include "bconfig.h"
+#else
+#include "config.h"
+#endif
#include "system.h"
#include "errors.h" /* for fatal */
#include "getopt.h"
{
case NOTE_INSN_MAX:
case NOTE_INSN_DELETED_LABEL:
+ case NOTE_INSN_DELETED_DEBUG_LABEL:
note_flds = create_field (note_flds, &string_type, "rt_str");
break;
"tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
"cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
"target.h", "ipa-prop.h", "lto-streamer.h", "target-globals.h",
- "ipa-inline.h", NULL
+ "ipa-inline.h", "dwarf2out.h", NULL
};
const char *const *ifp;
outf_p gtype_desc_c;
REG_EXTENDED, NULL_REGEX,
"gt-objc-objc-act.h", "objc/objc-act.c", NULL_FRULACT },
+ /* objc/objc-map.h gives gt-objc-objc-map.h for objc/objc-map.c ! */
+ { DIR_PREFIX_REGEX "objc/objc-map\\.h$",
+ REG_EXTENDED, NULL_REGEX,
+ "gt-objc-objc-map.h", "objc/objc-map.c", NULL_FRULACT },
+
/* General cases. For header *.h and source *.c files, we need
* special actions to handle the language. */
int has_length, struct fileloc *line, const char *if_marked,
bool emit_pch, type_p field_type, const char *field_name)
{
+ struct pair newv;
/* If the field reference is relative to V, rather than to some
subcomponent of V, we can mark any subarrays with a single stride.
We're effectively treating the field as a global variable in its
own right. */
if (v && type == v->type)
{
- struct pair newv;
-
newv = *v;
newv.type = field_type;
newv.name = ACONCAT ((v->name, ".", field_name, NULL));
finish_root_table (flp, "pch_rs", "LAST_GGC_ROOT_TAB", "ggc_root_tab",
"gt_pch_scalar_rtab");
}
+/* Record the definition of the vec_prefix structure, as defined in vec.h:
+
+ struct vec_prefix GTY(()) {
+ unsigned num;
+ unsigned alloc;
+ }; */
+static type_p
+vec_prefix_type (void)
+{
+ static type_p prefix_type = NULL;
+ if (prefix_type == NULL)
+ {
+ pair_p fields;
+ static struct fileloc pos = { NULL, 0 };
+ type_p len_ty = create_scalar_type ("unsigned");
+ pos.file = input_file_by_name (__FILE__); pos.line = __LINE__;
+ fields = create_field_at (0, len_ty, "alloc", 0, &pos);
+ fields = create_field_at (fields, len_ty, "num", 0, &pos);
+ prefix_type = new_structure ("vec_prefix", 0, &pos, fields, 0);
+ prefix_type->u.s.bitmap = -1;
+ }
+ return prefix_type;
+}
/* Record the definition of a generic VEC structure, as if we had expanded
the macros in vec.h:
typedef struct VEC_<type>_base GTY(()) {
- unsigned num;
- unsigned alloc;
- <type> GTY((length ("%h.num"))) vec[1];
+ struct vec_prefix prefix;
+ <type> GTY((length ("%h.prefix.num"))) vec[1];
} VEC_<type>_base
where the GTY(()) tags are only present if is_scalar is _false_. */
pair_p fields;
type_p t;
options_p o;
- type_p len_ty = create_scalar_type ("unsigned");
const char *name = concat ("VEC_", type_name, "_base", (char *) 0);
if (is_scalar)
else
{
t = resolve_typedef (type_name, pos);
- o = create_string_option (0, "length", "%h.num");
+ o = create_string_option (0, "length", "%h.prefix.num");
}
/* We assemble the field list in reverse order. */
fields = create_field_at (0, create_array (t, "1"), "vec", o, pos);
- fields = create_field_at (fields, len_ty, "alloc", 0, pos);
- fields = create_field_at (fields, len_ty, "num", 0, pos);
+ fields = create_field_at (fields, vec_prefix_type (), "prefix", 0, pos);
do_typedef (name, new_structure (name, 0, pos, fields, 0), pos);
}