Mercurial > hg > CbC > CbC_gcc
comparison gcc/gengtype.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Process source files and output type information. | 1 /* Process source files and output type information. |
2 Copyright (C) 2002-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2002-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
669 than fully-supporting namespaces, simply strip off the "gcc::" prefix | 669 than fully-supporting namespaces, simply strip off the "gcc::" prefix |
670 where present. This allows us to have GTY roots of this form: | 670 where present. This allows us to have GTY roots of this form: |
671 extern GTY(()) gcc::some_type *some_ptr; | 671 extern GTY(()) gcc::some_type *some_ptr; |
672 where the autogenerated functions will refer to simply "some_type", | 672 where the autogenerated functions will refer to simply "some_type", |
673 where they can be resolved into their namespace. */ | 673 where they can be resolved into their namespace. */ |
674 if (0 == strncmp (s, "gcc::", 5)) | 674 if (strncmp (s, "gcc::", 5) == 0) |
675 s += 5; | 675 s += 5; |
676 | 676 |
677 for (p = typedefs; p != NULL; p = p->next) | 677 for (p = typedefs; p != NULL; p = p->next) |
678 if (strcmp (p->name, s) == 0) | 678 if (strcmp (p->name, s) == 0) |
679 return p->type; | 679 return p->type; |
1185 case NOTE_INSN_BLOCK_END: | 1185 case NOTE_INSN_BLOCK_END: |
1186 note_flds = create_field (note_flds, tree_tp, "rt_tree"); | 1186 note_flds = create_field (note_flds, tree_tp, "rt_tree"); |
1187 break; | 1187 break; |
1188 | 1188 |
1189 case NOTE_INSN_VAR_LOCATION: | 1189 case NOTE_INSN_VAR_LOCATION: |
1190 case NOTE_INSN_CALL_ARG_LOCATION: | |
1191 note_flds = create_field (note_flds, rtx_tp, "rt_rtx"); | 1190 note_flds = create_field (note_flds, rtx_tp, "rt_rtx"); |
1192 break; | 1191 break; |
1193 | 1192 |
1194 default: | 1193 default: |
1195 note_flds = create_field (note_flds, scalar_tp, "rt_int"); | 1194 note_flds = create_field (note_flds, scalar_tp, "rt_int"); |
1237 case 'n': | 1236 case 'n': |
1238 case 'w': | 1237 case 'w': |
1239 case 'r': | 1238 case 'r': |
1240 t = scalar_tp; | 1239 t = scalar_tp; |
1241 subname = "rt_int"; | 1240 subname = "rt_int"; |
1241 break; | |
1242 | |
1243 case 'p': | |
1244 t = scalar_tp; | |
1245 subname = "rt_subreg"; | |
1242 break; | 1246 break; |
1243 | 1247 |
1244 case '0': | 1248 case '0': |
1245 if (i == MEM && aindex == 1) | 1249 if (i == MEM && aindex == 1) |
1246 t = mem_attrs_tp, subname = "rt_mem"; | 1250 t = mem_attrs_tp, subname = "rt_mem"; |
1605 | 1609 |
1606 static outf_p | 1610 static outf_p |
1607 create_file (const char *name, const char *oname) | 1611 create_file (const char *name, const char *oname) |
1608 { | 1612 { |
1609 static const char *const hdr[] = { | 1613 static const char *const hdr[] = { |
1610 " Copyright (C) 2004-2017 Free Software Foundation, Inc.\n", | 1614 " Copyright (C) 2004-2018 Free Software Foundation, Inc.\n", |
1611 "\n", | 1615 "\n", |
1612 "This file is part of GCC.\n", | 1616 "This file is part of GCC.\n", |
1613 "\n", | 1617 "\n", |
1614 "GCC is free software; you can redistribute it and/or modify it under\n", | 1618 "GCC is free software; you can redistribute it and/or modify it under\n", |
1615 "the terms of the GNU General Public License as published by the Free\n", | 1619 "the terms of the GNU General Public License as published by the Free\n", |
1708 static const char *const ifiles[] = { | 1712 static const char *const ifiles[] = { |
1709 "config.h", "system.h", "coretypes.h", | 1713 "config.h", "system.h", "coretypes.h", |
1710 "backend.h", "predict.h", "tree.h", | 1714 "backend.h", "predict.h", "tree.h", |
1711 "rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h", | 1715 "rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h", |
1712 "alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h", | 1716 "alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h", |
1713 "explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h", | 1717 "explow.h", "calls.h", "memmodel.h", "emit-rtl.h", "varasm.h", |
1714 "stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", | 1718 "stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", |
1715 "optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", | 1719 "optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", |
1716 "tree-eh.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", | 1720 "tree-eh.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", |
1717 "tree-vrp.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", | 1721 "tree-vrp.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", |
1718 "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", | 1722 "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", |
1719 "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h", | 1723 "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h", |
1720 "tree-dfa.h", "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h", | 1724 "tree-dfa.h", "tree-ssa.h", "reload.h", "cpplib.h", "tree-chrec.h", |
1721 "except.h", "output.h", "cfgloop.h", "target.h", "lto-streamer.h", | 1725 "except.h", "output.h", "cfgloop.h", "target.h", "lto-streamer.h", |
1722 "target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h", | 1726 "target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h", |
1723 "ipa-prop.h", "ipa-fnsummary.h", "dwarf2out.h", "omp-offload.h", NULL | 1727 "ipa-prop.h", "ipa-fnsummary.h", "dwarf2out.h", "omp-offload.h", NULL |
1724 }; | 1728 }; |
1725 const char *const *ifp; | 1729 const char *const *ifp; |
5185 Call;} while (0) | 5189 Call;} while (0) |
5186 POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos)); | 5190 POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos)); |
5187 POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos)); | 5191 POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos)); |
5188 POS_HERE (do_scalar_typedef ("FIXED_VALUE_TYPE", &pos)); | 5192 POS_HERE (do_scalar_typedef ("FIXED_VALUE_TYPE", &pos)); |
5189 POS_HERE (do_scalar_typedef ("double_int", &pos)); | 5193 POS_HERE (do_scalar_typedef ("double_int", &pos)); |
5194 POS_HERE (do_scalar_typedef ("poly_int64_pod", &pos)); | |
5190 POS_HERE (do_scalar_typedef ("offset_int", &pos)); | 5195 POS_HERE (do_scalar_typedef ("offset_int", &pos)); |
5191 POS_HERE (do_scalar_typedef ("widest_int", &pos)); | 5196 POS_HERE (do_scalar_typedef ("widest_int", &pos)); |
5192 POS_HERE (do_scalar_typedef ("int64_t", &pos)); | 5197 POS_HERE (do_scalar_typedef ("int64_t", &pos)); |
5198 POS_HERE (do_scalar_typedef ("poly_int64", &pos)); | |
5193 POS_HERE (do_scalar_typedef ("uint64_t", &pos)); | 5199 POS_HERE (do_scalar_typedef ("uint64_t", &pos)); |
5194 POS_HERE (do_scalar_typedef ("uint8", &pos)); | 5200 POS_HERE (do_scalar_typedef ("uint8", &pos)); |
5195 POS_HERE (do_scalar_typedef ("uintptr_t", &pos)); | 5201 POS_HERE (do_scalar_typedef ("uintptr_t", &pos)); |
5196 POS_HERE (do_scalar_typedef ("jword", &pos)); | 5202 POS_HERE (do_scalar_typedef ("jword", &pos)); |
5197 POS_HERE (do_scalar_typedef ("JCF_u2", &pos)); | 5203 POS_HERE (do_scalar_typedef ("JCF_u2", &pos)); |
5198 POS_HERE (do_scalar_typedef ("void", &pos)); | 5204 POS_HERE (do_scalar_typedef ("void", &pos)); |
5199 POS_HERE (do_scalar_typedef ("machine_mode", &pos)); | 5205 POS_HERE (do_scalar_typedef ("machine_mode", &pos)); |
5206 POS_HERE (do_scalar_typedef ("fixed_size_mode", &pos)); | |
5200 POS_HERE (do_typedef ("PTR", | 5207 POS_HERE (do_typedef ("PTR", |
5201 create_pointer (resolve_typedef ("void", &pos)), | 5208 create_pointer (resolve_typedef ("void", &pos)), |
5202 &pos)); | 5209 &pos)); |
5203 #undef POS_HERE | 5210 #undef POS_HERE |
5204 read_input_list (inputlist); | 5211 read_input_list (inputlist); |