/* Process source files and output type information.
- Copyright (C) 2002-2014 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015 Free Software Foundation, Inc.
This file is part of GCC.
#include "errors.h" /* for fatal */
#include "getopt.h"
#include "version.h" /* for version_string & pkgversion_string. */
-#include "hashtab.h"
#include "xregex.h"
#include "obstack.h"
#include "gengtype.h"
va_end (ap);
}
-
-/* asprintf, but produces fatal message on out-of-memory. */
-char *
-xasprintf (const char *format, ...)
-{
- int n;
- char *result;
- va_list ap;
-
- va_start (ap, format);
- n = vasprintf (&result, format, ap);
- if (result == NULL || n < 0)
- fatal ("out of memory");
- va_end (ap);
-
- return result;
-}
\f
/* Locate the ultimate base class of struct S. */
comma-separated list of strings, implicitly assumed to
be type names, potentially with "*" characters. */
char *arg = open_bracket + 1;
- char *next;
+ /* Workaround -Wmaybe-uninitialized false positive during
+ profiledbootstrap by initializing it. */
+ char *next = NULL;
char *type_id = strtoken (arg, ",>", &next);
pair_p fields = 0;
while (type_id)
case 'i':
case 'n':
case 'w':
+ case 'r':
t = scalar_tp;
subname = "rt_int";
break;
t = scalar_tp, subname = "rt_int";
else if (i == DEBUG_EXPR && aindex == 0)
t = tree_tp, subname = "rt_tree";
- else if (i == REG && aindex == 1)
- t = reg_attrs_tp, subname = "rt_reg";
else if (i == SYMBOL_REF && aindex == 1)
t = symbol_union_tp, subname = "";
else if (i == JUMP_TABLE_DATA && aindex >= 4)
"CONSTANT_POOL_ADDRESS_P (&%0)");
}
+ if (i == REG)
+ subfields = create_field (subfields, reg_attrs_tp, "reg.attrs");
+
if (i == SYMBOL_REF)
{
/* Add the "block_sym" field if SYMBOL_REF_HAS_BLOCK_INFO_P
create_file (const char *name, const char *oname)
{
static const char *const hdr[] = {
- " Copyright (C) 2004-2014 Free Software Foundation, Inc.\n",
+ " Copyright (C) 2004-2015 Free Software Foundation, Inc.\n",
"\n",
"This file is part of GCC.\n",
"\n",
/* The order of files here matters very much. */
static const char *const ifiles[] = {
"config.h", "system.h", "coretypes.h", "tm.h", "insn-codes.h",
- "hashtab.h", "splay-tree.h", "obstack.h", "bitmap.h", "input.h",
- "tree.h", "rtl.h", "wide-int.h", "hashtab.h", "hash-set.h", "vec.h",
- "machmode.h", "tm.h", "hard-reg-set.h", "input.h", "predict.h",
- "function.h", "insn-config.h", "expr.h", "alloc-pool.h",
- "hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h",
- "optabs.h", "libfuncs.h", "debug.h", "ggc.h",
- "hash-table.h", "vec.h", "ggc.h", "dominance.h", "cfg.h", "basic-block.h",
+ "splay-tree.h", "obstack.h", "bitmap.h", "input.h",
+ "alias.h", "symtab.h", "options.h",
+ "tree.h", "fold-const.h", "rtl.h",
+ "hard-reg-set.h", "predict.h",
+ "function.h", "insn-config.h", "flags.h",
+ "tree.h", "expmed.h", "dojump.h",
+ "explow.h", "calls.h", "emit-rtl.h", "varasm.h", "stmt.h",
+ "expr.h", "alloc-pool.h",
+ "basic-block.h", "cselib.h", "insn-addr.h",
+ "optabs.h", "libfuncs.h", "debug.h",
+ "dominance.h", "cfg.h", "basic-block.h",
"tree-ssa-alias.h", "internal-fn.h", "gimple-fold.h", "tree-eh.h",
"gimple-expr.h", "is-a.h",
"gimple.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h",
"tree-ssa-loop-niter.h", "tree-into-ssa.h", "tree-dfa.h",
"tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
"except.h", "output.h", "cfgloop.h", "target.h", "lto-streamer.h",
- "target-globals.h", "ipa-ref.h", "cgraph.h", "ipa-prop.h",
- "ipa-inline.h", "dwarf2out.h", "omp-low.h", NULL
+ "target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h",
+ "ipa-prop.h", "ipa-inline.h", "dwarf2out.h", "omp-low.h", NULL
};
const char *const *ifp;
outf_p gtype_desc_c;
this funcion will have to be adjusted to be more like
output_mangled_typename. */
-static void
-output_typename (outf_p of, const_type_p t)
-{
- switch (t->kind)
- {
- case TYPE_STRING:
- oprintf (of, "str");
- break;
- case TYPE_SCALAR:
- oprintf (of, "scalar");
- break;
- case TYPE_POINTER:
- output_typename (of, t->u.p);
- break;
- case TYPE_STRUCT:
- case TYPE_USER_STRUCT:
- case TYPE_UNION:
- case TYPE_LANG_STRUCT:
- oprintf (of, "%s", t->u.s.tag);
- break;
- case TYPE_NONE:
- case TYPE_UNDEFINED:
- case TYPE_ARRAY:
- gcc_unreachable ();
- }
-}
-
#define INDENT 2
/* Dumps the value of typekind KIND. */