aboutsummaryrefslogtreecommitdiff
path: root/gcc/gengtype.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-06-30 11:21:54 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-06-30 11:21:54 -0700
commit9506ac2be5e52ce7e184be3c52d31421355b7ab4 (patch)
treee54e6194b2452bb0b1eea27a54b905b6672b2f10 /gcc/gengtype.c
parent6773e15fa5ac64bf67b19088e149f4d3cda2cf9a (diff)
downloadgcc-9506ac2be5e52ce7e184be3c52d31421355b7ab4.zip
gcc-9506ac2be5e52ce7e184be3c52d31421355b7ab4.tar.gz
gcc-9506ac2be5e52ce7e184be3c52d31421355b7ab4.tar.bz2
Conditionally compile support for --enable-mapped_location.
* gengtype-lex.l: Temporary kludge to avoid duplicate typedef. * gengtype.c: Update for now typdefs in input.h. More kludges. * modulo-sched.c (sms_schedule): Use NOTE_EXPANDED_LOCATION macro. * ra-debug.c (ra_print_rtl): Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * rtl.h (gen_rtx_ASM_OPERANDS): Redefine if USE_MAPPED_LOCATION. * stmt.c (expand_asm_operands): Adjust calls to gen_rtx_ASM_OPERANDS. * tree-cfg.c: Use new macros and typedefs. * tree-flow-inline.h: Likewise. From-SVN: r83922
Diffstat (limited to 'gcc/gengtype.c')
-rw-r--r--gcc/gengtype.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 85e856f..6c19725 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1104,7 +1104,7 @@ open_base_files (void)
/* The order of files here matters very much. */
static const char *const ifiles [] = {
"config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
- "hashtab.h", "splay-tree.h", "bitmap.h", "tree.h", "rtl.h",
+ "hashtab.h", "splay-tree.h", "bitmap.h", "input.h", "tree.h", "rtl.h",
"function.h", "insn-config.h", "expr.h", "hard-reg-set.h",
"basic-block.h", "cselib.h", "insn-addr.h", "optabs.h",
"libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
@@ -2988,6 +2988,10 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
do_scalar_typedef ("uint8", &pos);
do_scalar_typedef ("jword", &pos);
do_scalar_typedef ("JCF_u2", &pos);
+#ifdef USE_MAPPED_LOCATION
+ do_scalar_typedef ("location_t", &pos);
+ do_scalar_typedef ("source_locus", &pos);
+#endif
do_scalar_typedef ("void", &pos);
do_typedef ("PTR", create_pointer (resolve_typedef ("void", &pos)), &pos);
@@ -3010,6 +3014,12 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
}
if (!dupflag)
parse_file (all_files[i]);
+#ifndef USE_MAPPED_LOCATION
+ /* temporary kludge - gengtype doesn't handle conditionals.
+ Manually add source_locus *after* we've processed input.h. */
+ if (i == 0)
+ do_typedef ("source_locus", create_pointer (resolve_typedef ("location_t", &pos)), &pos);
+#endif
}
if (hit_error != 0)