]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
common.opt (main_input_filename, [...]): New Variable entries.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 1 Dec 2010 13:46:36 +0000 (13:46 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 1 Dec 2010 13:46:36 +0000 (13:46 +0000)
* common.opt (main_input_filename, main_input_basename,
main_input_baselength): New Variable entries.  From toplev.c.
* final.c (output_quoted_string): Move from toplev.c.
* output.h (output_quoted_string): Move from toplev.h.
* opts-global.c (read_cmdline_options): Use gcc_options pointer to
access main_input_filename, main_input_baselength and
main_input_basename.
* targhooks.c: Include intl.h and opts.h.
(option_affects_pch_p, default_get_pch_validity): Move from
toplev.c.
* targhooks.h (option_affects_pch_p, default_get_pch_validity):
Move from toplev.h.
* toplev.c (main_input_filename, main_input_basename,
main_input_baselength): Move to common.opt.
(output_quoted_string): Move to final.c.
(warn_deprecated_use): Move to tree.c.
(option_affects_pch_p, default_get_pch_validity,
pch_option_mismatch, default_pch_valid_p): Move to targhooks.c.
* toplev.h (skip_leading_substring): Move to tree-dump.c.
(warn_deprecated_use): Move to tree.h.
(output_quoted_string): Move to output.h.
(main_input_filename, main_input_basename, main_input_baselength):
Move to common.opt.
(default_get_pch_validity, default_pch_valid_p): Move to
targhooks.c.
* tree-dump.c (skip_leading_substring): Move from toplev.h.
* tree.c (warn_deprecated_use): Move from toplev.c.
* tree.h (warn_deprecated_use): Move from toplev.h.
* c-typeck.c, config/alpha/alpha.c, config/arc/arc.c,
config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c,
config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c,
config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c,
config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c,
config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c,
config/mcore/mcore.c, config/mep/mep.c,
config/microblaze/microblaze.c, config/mips/mips.c,
config/mmix/mmix.c, config/mn10300/mn10300.c,
config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c,
config/picochip/picochip.c, config/s390/s390.c,
config/score/score.c, config/sh/sh.c, config/sparc/sparc.c,
config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c,
config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c,
graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c,
varasm.c, xcoffout.c: Don't include toplev.h.
* Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o,
gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o,
varasm.o, xcoffout.o): Update dependencies.
* config/arm/t-arm (arm.o): Update dependencies.
* config/spu/t-spu-elf (spu.o): Update dependencies.

cp:
* cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h.
* Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o):
Update dependencies.

java:
* jcf-parse.c: Don't include toplev.h.
* Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.

From-SVN: r167329

67 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/c-typeck.c
gcc/common.opt
gcc/config/alpha/alpha.c
gcc/config/arc/arc.c
gcc/config/arm/arm.c
gcc/config/arm/t-arm
gcc/config/avr/avr.c
gcc/config/bfin/bfin.c
gcc/config/cris/cris.c
gcc/config/crx/crx.c
gcc/config/fr30/fr30.c
gcc/config/frv/frv.c
gcc/config/h8300/h8300.c
gcc/config/ia64/ia64.c
gcc/config/iq2000/iq2000.c
gcc/config/lm32/lm32.c
gcc/config/m32c/m32c.c
gcc/config/m32r/m32r.c
gcc/config/m68hc11/m68hc11.c
gcc/config/m68k/m68k.c
gcc/config/mcore/mcore.c
gcc/config/mep/mep.c
gcc/config/microblaze/microblaze.c
gcc/config/mips/mips.c
gcc/config/mmix/mmix.c
gcc/config/mn10300/mn10300.c
gcc/config/moxie/moxie.c
gcc/config/pa/pa.c
gcc/config/pdp11/pdp11.c
gcc/config/picochip/picochip.c
gcc/config/s390/s390.c
gcc/config/score/score.c
gcc/config/sh/sh.c
gcc/config/sparc/sparc.c
gcc/config/spu/spu.c
gcc/config/spu/t-spu-elf
gcc/config/stormy16/stormy16.c
gcc/config/v850/v850.c
gcc/config/vax/vax.c
gcc/config/xtensa/xtensa.c
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/cp-objcp-common.c
gcc/cp/lex.c
gcc/cp/typeck.c
gcc/final.c
gcc/gimple-low.c
gcc/graphite-sese-to-poly.c
gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/jcf-parse.c
gcc/opts-global.c
gcc/output.h
gcc/plugin.c
gcc/targhooks.c
gcc/targhooks.h
gcc/toplev.c
gcc/toplev.h
gcc/tree-cfg.c
gcc/tree-dump.c
gcc/tree-inline.c
gcc/tree.c
gcc/tree.h
gcc/varasm.c
gcc/xcoffout.c

index 56bb5347d2d4b1208b7fb3e97db0dc975f433c88..00e29e249a6f4baf6148b257b94cdc585a6790b5 100644 (file)
@@ -1,3 +1,55 @@
+2010-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * common.opt (main_input_filename, main_input_basename,
+       main_input_baselength): New Variable entries.  From toplev.c.
+       * final.c (output_quoted_string): Move from toplev.c.
+       * output.h (output_quoted_string): Move from toplev.h.
+       * opts-global.c (read_cmdline_options): Use gcc_options pointer to
+       access main_input_filename, main_input_baselength and
+       main_input_basename.
+       * targhooks.c: Include intl.h and opts.h.
+       (option_affects_pch_p, default_get_pch_validity): Move from
+       toplev.c.
+       * targhooks.h (option_affects_pch_p, default_get_pch_validity):
+       Move from toplev.h.
+       * toplev.c (main_input_filename, main_input_basename,
+       main_input_baselength): Move to common.opt.
+       (output_quoted_string): Move to final.c.
+       (warn_deprecated_use): Move to tree.c.
+       (option_affects_pch_p, default_get_pch_validity,
+       pch_option_mismatch, default_pch_valid_p): Move to targhooks.c.
+       * toplev.h (skip_leading_substring): Move to tree-dump.c.
+       (warn_deprecated_use): Move to tree.h.
+       (output_quoted_string): Move to output.h.
+       (main_input_filename, main_input_basename, main_input_baselength):
+       Move to common.opt.
+       (default_get_pch_validity, default_pch_valid_p): Move to
+       targhooks.c.
+       * tree-dump.c (skip_leading_substring): Move from toplev.h.
+       * tree.c (warn_deprecated_use): Move from toplev.c.
+       * tree.h (warn_deprecated_use): Move from toplev.h.
+       * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c,
+       config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c,
+       config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c,
+       config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c,
+       config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c,
+       config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c,
+       config/mcore/mcore.c, config/mep/mep.c,
+       config/microblaze/microblaze.c, config/mips/mips.c,
+       config/mmix/mmix.c, config/mn10300/mn10300.c,
+       config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c,
+       config/picochip/picochip.c, config/s390/s390.c,
+       config/score/score.c, config/sh/sh.c, config/sparc/sparc.c,
+       config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c,
+       config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c,
+       graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c,
+       varasm.c, xcoffout.c: Don't include toplev.h.
+       * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o,
+       gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o,
+       varasm.o, xcoffout.o): Update dependencies.
+       * config/arm/t-arm (arm.o): Update dependencies.
+       * config/spu/t-spu-elf (spu.o): Update dependencies.
+
 2010-12-01  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/46730
index 0852220a3646e56fe574bd0b626edfb2d7a9082b..a3ea7a36c680b6c87feb1f27d6de3ee8d880d835 100644 (file)
@@ -2050,7 +2050,7 @@ c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
 
 c-typeck.o : c-typeck.c c-lang.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
        $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
-       toplev.h langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H)
+       langhooks.h tree-iterator.h $(BITMAP_H) $(GIMPLE_H)
 
 
 
@@ -2352,7 +2352,7 @@ tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H)
 tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
-   $(HASHTAB_H) toplev.h langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
+   $(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
    intl.h $(FUNCTION_H) $(GIMPLE_H) \
    debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \
    $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_H) \
@@ -2498,7 +2498,7 @@ tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
    $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
    $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
    $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
-   $(CFGLAYOUT_H) $(BASIC_BLOCK_H) toplev.h \
+   $(CFGLAYOUT_H) $(BASIC_BLOCK_H) \
    value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-pretty-print.h \
    gimple-pretty-print.h
 tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
@@ -2646,7 +2646,7 @@ gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
    $(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h \
    $(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
    $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) $(TREE_PASS_H) \
-   $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) tree-iterator.h
+   $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) tree-iterator.h
 omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_CORE_H) \
    $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \
@@ -2732,7 +2732,7 @@ graphite-scop-detection.o: graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
    graphite-scop-detection.h graphite-poly.h
 graphite-sese-to-poly.o: graphite-sese-to-poly.c $(CONFIG_H) \
    $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) toplev.h $(DIAGNOSTIC_CORE_H) \
+   $(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(DIAGNOSTIC_CORE_H) \
    $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) \
    $(TREE_DATA_REF_H) tree-pass.h domwalk.h graphite.h \
    pointer-set.h value-prof.h graphite-ppl.h sese.h \
@@ -2836,7 +2836,7 @@ opts-common.o : opts-common.c $(OPTS_H) $(FLAGS_H) $(CONFIG_H) $(SYSTEM_H) \
 targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
    $(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(DIAGNOSTIC_CORE_H) \
    $(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \
-   $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h
+   $(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h intl.h $(OPTS_H)
 
 bversion.h: s-bversion; @true
 s-bversion: BASE-VER
@@ -2878,7 +2878,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(PLUGIN_H)
 
 plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H)
+   $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) $(GGC_H)
 
 main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H)
 
@@ -2902,7 +2902,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(DIA
 
 varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \
-   output.h toplev.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
+   output.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
    $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \
    $(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \
    tree-iterator.h pointer-set.h
@@ -2983,7 +2983,7 @@ dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
 vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) version.h \
    $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H)
 xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
-   $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h dbxout.h \
+   $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) $(DIAGNOSTIC_CORE_H) output.h dbxout.h \
    $(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h
 godump.o : godump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
    $(TREE_H) $(GGC_H) pointer-set.h $(OBSTACK_H) debug.h
index 65d255abd135342ee7266393ae835e8c978ebb06..77a38642b6ead91529571627afa81a9eb090b2d5 100644 (file)
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "c-lang.h"
 #include "flags.h"
 #include "output.h"
-#include "toplev.h"
 #include "intl.h"
 #include "target.h"
 #include "tree-iterator.h"
index 57f5b0a27e983e7ddd92652057e33ea11942a318..dd672a0357f15d7aa4bb6f2e6123f3e91eab1e7f 100644 (file)
@@ -157,6 +157,22 @@ int flag_print_asm_name
 Variable
 enum graph_dump_types graph_dump_format = no_graph
 
+; Name of top-level original source file (what was input to cpp).
+; This comes from the #-command at the beginning of the actual input.
+; If there isn't any there, then this is the cc1 input file name.
+Variable
+const char *main_input_filename
+
+; Pointer to base name in main_input_filename, with directories and a
+; single final extension removed, and the length of this base
+; name.
+
+Variable
+const char *main_input_basename
+
+Variable
+int main_input_baselength
+
 ; Which options have been printed by --help.
 Variable
 char *help_printed
index 1ecd2c4d70feae0083d094be19816c99b4c92037..76ab31aea730ad976e21f0aba71b02b04f5cbd5e 100644 (file)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "tm_p.h"
index c13eb717170e8a83be04e4a3b3fd5ace5d10bf14..f1afda20f97463f7e71b9df2470df12df6d3404a 100644 (file)
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "df.h"
 #include "tm_p.h"
 #include "target.h"
index 53a847d7615971a4c09f5e6f50af01640a68859c..38714609cabf5f3f5d76f8f359d38dd1bfae8956 100644 (file)
@@ -41,7 +41,6 @@
 #include "expr.h"
 #include "optabs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "recog.h"
 #include "cgraph.h"
 #include "ggc.h"
index 4879211be37c34d36a6204d51a38a13ab714ad43..e1aa815664c8275c8dcbac7680dfc629b91ce1b5 100644 (file)
@@ -49,7 +49,7 @@ arm.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(RTL_H) $(TREE_H) $(OBSTACK_H) $(REGS_H) hard-reg-set.h \
   insn-config.h conditions.h output.h \
   $(INSN_ATTR_H) $(FLAGS_H) reload.h $(FUNCTION_H) \
-  $(EXPR_H) $(OPTABS_H) toplev.h $(RECOG_H) $(CGRAPH_H) \
+  $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(CGRAPH_H) \
   $(GGC_H) except.h $(C_PRAGMA_H) $(INTEGRATE_H) $(TM_P_H) \
   $(TARGET_H) $(TARGET_DEF_H) debug.h langhooks.h $(DF_H) \
   intl.h libfuncs.h $(PARAMS_H)
index 9e18b00d48267f10dcde0f3c881ee96b73649494..30e4626ec2bdc08cc151d4b8571f3c643bf683f4 100644 (file)
@@ -35,7 +35,6 @@
 #include "output.h"
 #include "expr.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "obstack.h"
 #include "function.h"
 #include "recog.h"
index 0abb4ebdd0493f71762c37d4ff56a7b60ab04505..93edc88b558bb1329e1135c82ae074eb125df527 100644 (file)
@@ -41,7 +41,6 @@
 #include "target-def.h"
 #include "expr.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "recog.h"
 #include "optabs.h"
 #include "ggc.h"
index 49213b6334c99832f266eb970cdb05de52fa109e..aec7cba63bb137da06b8df8076b39b0b92eee93f 100644 (file)
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "recog.h"
 #include "reload.h"
 #include "tm_p.h"
index d6b9022b239e1ddeb784739f2f49c0ccb792140c..79d341c472e33adff06a2d9cf0fdc31fdf41a623 100644 (file)
@@ -44,7 +44,6 @@
 #include "expr.h"
 #include "optabs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "basic-block.h"
 #include "df.h"
 #include "target.h"
index 77196c1cea89c2b5097dcaa9d09d1a87ddfebb0d..74585b5dc0c510478fb86618bf697cd24de23f52 100644 (file)
@@ -41,7 +41,6 @@
 #include "function.h"
 #include "df.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
index f8653c761e042b1102458fbdac808cf13c801757..56f69e2065d76a5167cb1f926911a12a35b257a4 100644 (file)
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "optabs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "basic-block.h"
 #include "tm_p.h"
 #include "ggc.h"
index 31aa54cca9b1b1b2a4a2834e25736aaa8a0670b3..834fc992fc1fe7e0166175629875023d8010694b 100644 (file)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "optabs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "c-family/c-pragma.h" /* ??? */
 #include "tm_p.h"
 #include "ggc.h"
index 878cd72a6526c6756962486ffcc6f02f7a5f77df..0c2d20eaf6e0e8574efaaead8b18d22b2ef06f46 100644 (file)
@@ -43,7 +43,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "libfuncs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "sched-int.h"
 #include "timevar.h"
 #include "target.h"
index cc4c80f2836cba03b768692e55ddf2f57a7db68b..b838fecb9f1a7449744214a4638dc3b0b3637b28 100644 (file)
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "libfuncs.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "reload.h"
 #include "ggc.h"
 #include "tm_p.h"
index b155697b97f16cca690a1bc83cebcdc099e9885b..05888ee52898a5030b4ce78796bc4f12b7528e1e 100644 (file)
@@ -41,7 +41,6 @@
 #include "tm_p.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "ggc.h"
index 659de83fcf0d390be0e67c77fca28f8046e44d30..3a741392aa02c0275baca9a8683e231a15240b28 100644 (file)
@@ -35,7 +35,6 @@
 #include "recog.h"
 #include "reload.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
index 18ac2608dabf4206884b6a13a3a59ffc7e0da703..410882766c7cf78f362cc559ba078752609d8691 100644 (file)
@@ -35,7 +35,6 @@
 #include "function.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "df.h"
index 00d409e8aac4bb6f854d03754a8771c7f955930c..f45de3d8505be1b36c2f5b1bf8d84467ffd38328 100644 (file)
@@ -51,7 +51,6 @@ Note:
 #include "expr.h"
 #include "libfuncs.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "basic-block.h"
 #include "function.h"
 #include "ggc.h"
index 619cf5c33d6d5f12b2d70a0f91be0df71dc7c254..eedf009b1e29a350679f1dd947e72bc14273c37d 100644 (file)
@@ -34,7 +34,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "insn-attr.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "expr.h"
 #include "reload.h"
 #include "tm_p.h"
index 3c3e1bba811b06b31c2b5a40dc3f9ebf531e5e98..a66eb3cd162cdb0150d18965bdc0efb416dd36ae 100644 (file)
@@ -41,7 +41,6 @@
 #include "function.h"
 #include "ggc.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "target.h"
 #include "target-def.h"
 #include "df.h"
index 96b9eb2a0d09a3adce74bae1537329f88fa32eee..3b1127914e8336f6f0b97114127c258fe7f0f878 100644 (file)
@@ -44,7 +44,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "ggc.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "integrate.h"
 #include "target.h"
 #include "target-def.h"
index 2cd28fc8932253f96b3c3b0cf4e80508434f8f53..b50c7942e0d471fbedd72414e301a0dd3eedf01e 100644 (file)
@@ -33,7 +33,6 @@
 #include "insn-attr.h"
 #include "integrate.h"
 #include "recog.h"
-#include "toplev.h"
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
index 7e7e428d17fc25fdf3ae473b6d544d24b12e5484..74f7a7951ec7fa9aa9b4c04a3a84d8d664096eda 100644 (file)
@@ -34,7 +34,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "conditions.h"
 #include "insn-attr.h"
 #include "recog.h"
-#include "toplev.h"
 #include "output.h"
 #include "tree.h"
 #include "function.h"
index 906bff9804bc527d1bf089d1fd2f64e8a5cfaf39..c08011638657c1b9b0988f7e4d53b8d8f15b7b34 100644 (file)
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "expr.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "recog.h"
 #include "ggc.h"
 #include "dwarf2.h"
index 709407e57f63e412ee1c33b715299858f25f2d85..a4e0bc432df80478b0ff8e173d609055c250f22a 100644 (file)
@@ -39,7 +39,6 @@
 #include "function.h"
 #include "obstack.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
index dd8a145e52428ca61fd928727dcc98d87d2d2fca..53b73d15fcc0af55fe27d1c61dadc6ffccce5a21 100644 (file)
@@ -34,7 +34,6 @@
 #include "recog.h"
 #include "reload.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
index 81d85b9ae64d28f9baa13a77ef65ad289226c2e5..aa8ad01fd9a6b9956e4c10fd8cc66ef7ceb30fcc 100644 (file)
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "integrate.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "recog.h"
 #include "predict.h"
index b63d79fea9fb35b6f56ce40c9708e812cf0a78f0..35a76fadc22b72a2f223c60ffa3a4e47861102b7 100644 (file)
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "expr.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
index 20a5b37deddc4b7cc2329979bda2b02664732ddc..1ca95b4920d2bddf3f22b880a5e2e400d9866eab 100644 (file)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.  If not, see
 #include "basic-block.h"
 #include "integrate.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tm_p.h"
index 25807239e92f78ca4f9564277890acdb5dcef265..df5a246a2c1764751c8c256036cab7c0335446a7 100644 (file)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "reload.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "basic-block.h"
 #include "integrate.h"
 #include "ggc.h"
index f64f3d8195e4f20375846166856372c0c103005a..f9e4c0f677e932cf577ae5f8a14a68476f340c66 100644 (file)
@@ -30,7 +30,6 @@
 #include "insn-attr.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "output.h"
 #include "tree.h"
 #include "function.h"
index 7b87c962140de27690e5cb7189995864a36d2639..034b171711f0ea6668ec6f96e8ff149a8d60a6b2 100644 (file)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "insn-attr.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "recog.h"
 #include "integrate.h"
 #include "dwarf2.h"
index bdb44af48fd15e2b91f966dd2bf89f4337ae063a..85387cc5b77e8e03fc37eda0cf9fb4f1fc47784a 100644 (file)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "optabs.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "tm_p.h"
 #include "debug.h"
index 92845d7129cb62eb5483212561cd4358d1f09e3d..bdea7e032e8fd57403b4c0271e4e50cd31eebf32 100644 (file)
@@ -36,7 +36,6 @@
 #include "basic-block.h"
 #include "integrate.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tm_p.h"
index de559c9176ad218f947e012ca9afaaaf2d7dfa5c..cc8c94b387bd53f97ac69df1c0366fb1f84f4f37 100644 (file)
@@ -107,7 +107,7 @@ spu.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(RTL_H) $(REGS_H) hard-reg-set.h \
   real.h insn-config.h conditions.h insn-attr.h flags.h $(RECOG_H) \
   $(OBSTACK_H) $(TREE_H) $(EXPR_H) $(OPTABS_H) except.h function.h \
-  output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) toplev.h $(GGC_H) $(HASHTAB_H) \
+  output.h $(BASIC_BLOCK_H) $(INTEGRATE_H) $(GGC_H) $(HASHTAB_H) \
   $(TM_P_H) $(TARGET_H) $(TARGET_DEF_H) langhooks.h reload.h cfglayout.h \
   $(srcdir)/config/spu/spu-protos.h \
   $(srcdir)/config/spu/spu-builtins.def 
index ce83f683d392dd56701c09bf7d2738c46bac4293..fa5c5b5a8dc5f4171c591f1310efaafac6474976 100644 (file)
@@ -34,7 +34,6 @@
 #include "flags.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
index 1b3f3e483050efe0b3659cc490aa46a4d394f92e..6d6ed78266744dd030edeeaec4d488a6453ed511 100644 (file)
@@ -36,7 +36,6 @@
 #include "expr.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "tm_p.h"
index 9459b7f44208a1bdc4b513d14cb1060eac63d4cf..a9e032aa695fb0333ebf0115ccf4005760fb5f0f 100644 (file)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "debug.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tm-preds.h"
 #include "tm-constrs.h"
 #include "tm_p.h"
index 67d367caa851c49e337b7cc979349533b3743860..c3c69fdcc94b888c618102ec26d972112c303aa0 100644 (file)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "ggc.h"
index 706c974ae4a4907ea0e9dc59bfcd676af6b9955c..bfc522a6f580b7774814bfceac9593df2e243f85 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h.
+       * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o):
+       Update dependencies.
+
 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * decl.c (finish_function): Call objc_finish_function when
index e34a1ab72deac6ffff6f0df24ed25e307a766e61..afbf0da8d4799ddaa3e40e4009594a1fcf8d354a 100644 (file)
@@ -247,7 +247,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h $(C_COMMON_H) \
 CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H)
 
 cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
-  $(C_PRAGMA_H) toplev.h output.h input.h cp/operators.def $(TM_P_H)
+  $(C_PRAGMA_H) output.h input.h cp/operators.def $(TM_P_H)
 cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) debug.h langhooks.h \
   $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-cp.h gt-cp-cp-lang.h \
   cp/cp-objcp-common.h $(EXPR_H) $(TARGET_H)
@@ -261,14 +261,14 @@ cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h \
   $(C_PRAGMA_H) $(TREE_DUMP_H) intl.h $(TARGET_H) $(GIMPLE_H) $(POINTER_SET_H) \
   $(SPLAY_TREE_H) c-family/c-ada-spec.h
 cp/cp-objcp-common.o : cp/cp-objcp-common.c $(CONFIG_H) $(SYSTEM_H) \
-  coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) toplev.h \
+  coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) $(C_COMMON_H) \
   langhooks.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) debug.h \
   $(CXX_PRETTY_PRINT_H) cp/cp-objcp-common.h gt-cp-cp-objcp-common.h
 cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) output.h \
   $(TM_P_H) $(DIAGNOSTIC_CORE_H) gt-cp-typeck2.h $(REAL_H) intl.h
 cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
   toplev.h $(DIAGNOSTIC_H) convert.h $(C_COMMON_H) $(TARGET_H) \
-  output.h toplev.h
+  output.h
 cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h \
   $(TARGET_H) convert.h $(CGRAPH_H) $(TREE_DUMP_H) gt-cp-class.h \
   $(SPLAY_TREE_H)
index 0fdb87a4cc4c47d5f41949b660eedae1678ab321..f045d290eae07a175299df159d17854dda2a0d69 100644 (file)
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "cp-tree.h"
 #include "c-family/c-common.h"
-#include "toplev.h"
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "diagnostic.h"
index c583d7d307e80bc3e1a0091c2fd1628c9e9fa73a..5484317b6b8f2b5b61312dfed324fe7e89379326 100644 (file)
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cpplib.h"
 #include "flags.h"
 #include "c-family/c-pragma.h"
-#include "toplev.h"
 #include "output.h"
 #include "tm_p.h"
 #include "timevar.h"
index 80aa725d251905eb97edaa1b77685de7b45b8552..7cff632fbda0208512c91df5f98415bae0dd880b 100644 (file)
@@ -34,7 +34,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "flags.h"
 #include "output.h"
-#include "toplev.h"
 #include "diagnostic.h"
 #include "intl.h"
 #include "target.h"
index c4278ae49227f5fc2a519851b08cde605e6838e3..ebe21b607652e65e8ca750451be1f2c788f1dbba 100644 (file)
@@ -3620,6 +3620,32 @@ output_addr_const (FILE *file, rtx x)
     }
 }
 \f
+/* Output a quoted string.  */
+
+void
+output_quoted_string (FILE *asm_file, const char *string)
+{
+#ifdef OUTPUT_QUOTED_STRING
+  OUTPUT_QUOTED_STRING (asm_file, string);
+#else
+  char c;
+
+  putc ('\"', asm_file);
+  while ((c = *string++) != 0)
+    {
+      if (ISPRINT (c))
+       {
+         if (c == '\"' || c == '\\')
+           putc ('\\', asm_file);
+         putc (c, asm_file);
+       }
+      else
+       fprintf (asm_file, "\\%03o", (unsigned char) c);
+    }
+  putc ('\"', asm_file);
+#endif
+}
+\f
 /* A poor man's fprintf, with the added features of %I, %R, %L, and %U.
    %R prints the value of REGISTER_PREFIX.
    %L prints the value of LOCAL_LABEL_PREFIX.
index dcbb560cab199f5334f3313b9b40128b648b58e8..d3ec6a7bcf97379fe08242280e4cf5e5210456f6 100644 (file)
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "function.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tree-pass.h"
 
 /* The differences between High GIMPLE and Low GIMPLE are the
index 77930d5c67b0a9756b3448556a7377245f063636..2e56d7a088a39d4431b634916c6e499243258713 100644 (file)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "diagnostic.h"
 #include "tree-flow.h"
-#include "toplev.h"
 #include "tree-dump.h"
 #include "timevar.h"
 #include "cfgloop.h"
index 2629d200f2d367ce02cfbd69a2d608802ce5ca2a..16ea3712d07b903c7d94e9053adef70c60504b47 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * jcf-parse.c: Don't include toplev.h.
+       * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
+
 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
 
        * boehm.c: Don't include toplev.h.
index 3e3d2c993177bd84599d0332ea9db24ee5021916..f5852b405cff3b45cfe76306b0464ba1a191dff3 100644 (file)
@@ -295,7 +295,7 @@ java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \
 java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
   java/jcf.h
 java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \
-  input.h java/java-except.h $(SYSTEM_H) coretypes.h toplev.h \
+  input.h java/java-except.h $(SYSTEM_H) coretypes.h \
   java/parse.h $(GGC_H) debug.h $(REAL_H) gt-java-jcf-parse.h \
   java/jcf-reader.c java/zipfile.h java/jcf.h $(BITMAP_H)
 java/jvgenmain.o: java/jvgenmain.c $(CONFIG_H) $(JAVA_TREE_H) $(SYSTEM_H) \
index 28d9ad4422282efebedd7917f09b68e215bdf2bb..9166f311e999ca9e326d19ffe0e9889e1e6fec9f 100644 (file)
@@ -35,7 +35,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "javaop.h"
 #include "java-tree.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "parse.h"
 #include "ggc.h"
 #include "debug.h"
index dc462ec354f1d879a1baa587240fede19003e497..71c428e9b6b84c9f7f2ccabe4c82197903dd2d1a 100644 (file)
@@ -229,11 +229,12 @@ read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set,
          gcc_assert (opts == &global_options);
          gcc_assert (opts_set == &global_options_set);
 
-         if (main_input_filename == NULL)
+         if (opts->x_main_input_filename == NULL)
            {
-             main_input_filename = decoded_options[i].arg;
-             main_input_baselength
-               = base_of_path (main_input_filename, &main_input_basename);
+             opts->x_main_input_filename = decoded_options[i].arg;
+             opts->x_main_input_baselength
+               = base_of_path (opts->x_main_input_filename,
+                               &opts->x_main_input_basename);
            }
          add_input_filename (decoded_options[i].arg);
          continue;
index 928aa1f580f0820bf6cd3232d0258641e71a38a8..6a835c0f932b25da13851478c01290cbeacc44c7 100644 (file)
@@ -298,6 +298,8 @@ extern void output_shared_constant_pool (void);
 
 extern void output_object_blocks (void);
 
+extern void output_quoted_string (FILE *, const char *);
+
 /* Whether a constructor CTOR is a valid static constant initializer if all
    its elements are.  This used to be internal to initializer_constant_valid_p
    and has been exposed to let other functions like categorize_ctor_elements
index 6fd20585b3e8755e36f00ae4a00e06ccc9b17504..2179b8192885d47dbf42c16fd8a88653ea39b926 100644 (file)
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "coretypes.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
index 233a16f3ca3f23711bc23407248463eeff7b4304..14ec00c7bf284fee019be8bb0c6fd00bf90f51c9 100644 (file)
@@ -67,6 +67,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "reload.h"
 #include "optabs.h"
 #include "recog.h"
+#include "intl.h"
+#include "opts.h"
 
 
 bool
@@ -1356,6 +1358,115 @@ default_get_reg_raw_mode(int regno)
   return reg_raw_mode[regno];
 }
 
+/* Return true if the state of option OPTION should be stored in PCH files
+   and checked by default_pch_valid_p.  Store the option's current state
+   in STATE if so.  */
+
+static inline bool
+option_affects_pch_p (int option, struct cl_option_state *state)
+{
+  if ((cl_options[option].flags & CL_TARGET) == 0)
+    return false;
+  if (option_flag_var (option, &global_options) == &target_flags)
+    if (targetm.check_pch_target_flags)
+      return false;
+  return get_option_state (&global_options, option, state);
+}
+
+/* Default version of get_pch_validity.
+   By default, every flag difference is fatal; that will be mostly right for
+   most targets, but completely right for very few.  */
+
+void *
+default_get_pch_validity (size_t *sz)
+{
+  struct cl_option_state state;
+  size_t i;
+  char *result, *r;
+
+  *sz = 2;
+  if (targetm.check_pch_target_flags)
+    *sz += sizeof (target_flags);
+  for (i = 0; i < cl_options_count; i++)
+    if (option_affects_pch_p (i, &state))
+      *sz += state.size;
+
+  result = r = XNEWVEC (char, *sz);
+  r[0] = flag_pic;
+  r[1] = flag_pie;
+  r += 2;
+  if (targetm.check_pch_target_flags)
+    {
+      memcpy (r, &target_flags, sizeof (target_flags));
+      r += sizeof (target_flags);
+    }
+
+  for (i = 0; i < cl_options_count; i++)
+    if (option_affects_pch_p (i, &state))
+      {
+       memcpy (r, state.data, state.size);
+       r += state.size;
+      }
+
+  return result;
+}
+
+/* Return a message which says that a PCH file was created with a different
+   setting of OPTION.  */
+
+static const char *
+pch_option_mismatch (const char *option)
+{
+  char *r;
+
+  asprintf (&r, _("created and used with differing settings of '%s'"), option);
+  if (r == NULL)
+    return _("out of memory");
+  return r;
+}
+
+/* Default version of pch_valid_p.  */
+
+const char *
+default_pch_valid_p (const void *data_p, size_t len)
+{
+  struct cl_option_state state;
+  const char *data = (const char *)data_p;
+  size_t i;
+
+  /* -fpic and -fpie also usually make a PCH invalid.  */
+  if (data[0] != flag_pic)
+    return _("created and used with different settings of -fpic");
+  if (data[1] != flag_pie)
+    return _("created and used with different settings of -fpie");
+  data += 2;
+
+  /* Check target_flags.  */
+  if (targetm.check_pch_target_flags)
+    {
+      int tf;
+      const char *r;
+
+      memcpy (&tf, data, sizeof (target_flags));
+      data += sizeof (target_flags);
+      len -= sizeof (target_flags);
+      r = targetm.check_pch_target_flags (tf);
+      if (r != NULL)
+       return r;
+    }
+
+  for (i = 0; i < cl_options_count; i++)
+    if (option_affects_pch_p (i, &state))
+      {
+       if (memcmp (data, state.data, state.size) != 0)
+         return pch_option_mismatch (cl_options[i].opt_text);
+       data += state.size;
+       len -= state.size;
+      }
+
+  return NULL;
+}
+
 const struct default_options empty_optimization_table[] =
   {
     { OPT_LEVELS_NONE, 0, NULL, 0 }
index ce73f994cb8126b32748babe004dff2bc2ac7bcc..1e603c983dd4ba281a4b3b54e265c8274d69ad9f 100644 (file)
@@ -176,3 +176,6 @@ extern section * default_function_section(tree decl, enum node_frequency freq,
 extern enum machine_mode default_get_reg_raw_mode(int);
 
 extern const struct default_options empty_optimization_table[];
+
+extern void *default_get_pch_validity (size_t *);
+extern const char *default_pch_valid_p (const void *, size_t);
index 3050f0730e3aef93aa9b433541b40b6894ce5d6e..2cef957c30b6819381a1286ad8611d396570db83 100644 (file)
@@ -116,18 +116,6 @@ static bool no_backend;
 struct cl_decoded_option *save_decoded_options;
 unsigned int save_decoded_options_count;
 
-/* Name of top-level original source file (what was input to cpp).
-   This comes from the #-command at the beginning of the actual input.
-   If there isn't any there, then this is the cc1 input file name.  */
-
-const char *main_input_filename;
-
-/* Pointer to base name in main_input_filename, with directories and a
-   single final extension removed, and the length of this base
-   name.  */
-const char *main_input_basename;
-int main_input_baselength;
-
 /* Used to enable -fvar-tracking, -fweb and -frename-registers according
    to optimize in process_options ().  */
 #define AUTODETECT_VALUE 2
@@ -374,32 +362,6 @@ crash_signal (int signo)
   internal_error ("%s", strsignal (signo));
 }
 
-/* Output a quoted string.  */
-
-void
-output_quoted_string (FILE *asm_file, const char *string)
-{
-#ifdef OUTPUT_QUOTED_STRING
-  OUTPUT_QUOTED_STRING (asm_file, string);
-#else
-  char c;
-
-  putc ('\"', asm_file);
-  while ((c = *string++) != 0)
-    {
-      if (ISPRINT (c))
-       {
-         if (c == '\"' || c == '\\')
-           putc ('\\', asm_file);
-         putc (c, asm_file);
-       }
-      else
-       fprintf (asm_file, "\\%03o", (unsigned char) c);
-    }
-  putc ('\"', asm_file);
-#endif
-}
-
 /* A subroutine of wrapup_global_declarations.  We've come to the end of
    the compilation unit.  All deferred variables should be undeferred,
    and all incomplete decls should be finalized.  */
@@ -597,111 +559,6 @@ emit_debug_global_declarations (tree *vec, int len)
   timevar_pop (TV_SYMOUT);
 }
 
-/* Warn about a use of an identifier which was marked deprecated.  */
-void
-warn_deprecated_use (tree node, tree attr)
-{
-  const char *msg;
-
-  if (node == 0 || !warn_deprecated_decl)
-    return;
-
-  if (!attr)
-    {
-      if (DECL_P (node))
-       attr = DECL_ATTRIBUTES (node);
-      else if (TYPE_P (node))
-       {
-         tree decl = TYPE_STUB_DECL (node);
-         if (decl)
-           attr = lookup_attribute ("deprecated",
-                                    TYPE_ATTRIBUTES (TREE_TYPE (decl)));
-       }
-    }
-
-  if (attr)
-    attr = lookup_attribute ("deprecated", attr);
-
-  if (attr)
-    msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)));
-  else
-    msg = NULL;
-
-  if (DECL_P (node))
-    {
-      expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
-      if (msg)
-       warning (OPT_Wdeprecated_declarations,
-                "%qD is deprecated (declared at %s:%d): %s",
-                node, xloc.file, xloc.line, msg);
-      else
-       warning (OPT_Wdeprecated_declarations,
-                "%qD is deprecated (declared at %s:%d)",
-                node, xloc.file, xloc.line);
-    }
-  else if (TYPE_P (node))
-    {
-      tree what = NULL_TREE;
-      tree decl = TYPE_STUB_DECL (node);
-
-      if (TYPE_NAME (node))
-       {
-         if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
-           what = TYPE_NAME (node);
-         else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
-                  && DECL_NAME (TYPE_NAME (node)))
-           what = DECL_NAME (TYPE_NAME (node));
-       }
-
-      if (decl)
-       {
-         expanded_location xloc
-           = expand_location (DECL_SOURCE_LOCATION (decl));
-         if (what)
-           {
-             if (msg)
-               warning (OPT_Wdeprecated_declarations,
-                        "%qE is deprecated (declared at %s:%d): %s",
-                        what, xloc.file, xloc.line, msg);
-             else
-               warning (OPT_Wdeprecated_declarations,
-                        "%qE is deprecated (declared at %s:%d)", what,
-                        xloc.file, xloc.line);
-           }
-         else
-           {
-             if (msg)
-               warning (OPT_Wdeprecated_declarations,
-                        "type is deprecated (declared at %s:%d): %s",
-                        xloc.file, xloc.line, msg);
-             else
-               warning (OPT_Wdeprecated_declarations,
-                        "type is deprecated (declared at %s:%d)",
-                        xloc.file, xloc.line);
-           }
-       }
-      else
-       {
-         if (what)
-           {
-             if (msg)
-               warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s",
-                        what, msg);
-             else
-               warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what);
-           }
-         else
-           {
-             if (msg)
-               warning (OPT_Wdeprecated_declarations, "type is deprecated: %s",
-                        msg);
-             else
-               warning (OPT_Wdeprecated_declarations, "type is deprecated");
-           }
-       }
-    }
-}
-
 /* Compile an entire translation unit.  Write a file of assembly
    output and various debugging dumps.  */
 
@@ -1108,115 +965,6 @@ init_asm_output (const char *name)
     }
 }
 
-/* Return true if the state of option OPTION should be stored in PCH files
-   and checked by default_pch_valid_p.  Store the option's current state
-   in STATE if so.  */
-
-static inline bool
-option_affects_pch_p (int option, struct cl_option_state *state)
-{
-  if ((cl_options[option].flags & CL_TARGET) == 0)
-    return false;
-  if (option_flag_var (option, &global_options) == &target_flags)
-    if (targetm.check_pch_target_flags)
-      return false;
-  return get_option_state (&global_options, option, state);
-}
-
-/* Default version of get_pch_validity.
-   By default, every flag difference is fatal; that will be mostly right for
-   most targets, but completely right for very few.  */
-
-void *
-default_get_pch_validity (size_t *sz)
-{
-  struct cl_option_state state;
-  size_t i;
-  char *result, *r;
-
-  *sz = 2;
-  if (targetm.check_pch_target_flags)
-    *sz += sizeof (target_flags);
-  for (i = 0; i < cl_options_count; i++)
-    if (option_affects_pch_p (i, &state))
-      *sz += state.size;
-
-  result = r = XNEWVEC (char, *sz);
-  r[0] = flag_pic;
-  r[1] = flag_pie;
-  r += 2;
-  if (targetm.check_pch_target_flags)
-    {
-      memcpy (r, &target_flags, sizeof (target_flags));
-      r += sizeof (target_flags);
-    }
-
-  for (i = 0; i < cl_options_count; i++)
-    if (option_affects_pch_p (i, &state))
-      {
-       memcpy (r, state.data, state.size);
-       r += state.size;
-      }
-
-  return result;
-}
-
-/* Return a message which says that a PCH file was created with a different
-   setting of OPTION.  */
-
-static const char *
-pch_option_mismatch (const char *option)
-{
-  char *r;
-
-  asprintf (&r, _("created and used with differing settings of '%s'"), option);
-  if (r == NULL)
-    return _("out of memory");
-  return r;
-}
-
-/* Default version of pch_valid_p.  */
-
-const char *
-default_pch_valid_p (const void *data_p, size_t len)
-{
-  struct cl_option_state state;
-  const char *data = (const char *)data_p;
-  size_t i;
-
-  /* -fpic and -fpie also usually make a PCH invalid.  */
-  if (data[0] != flag_pic)
-    return _("created and used with different settings of -fpic");
-  if (data[1] != flag_pie)
-    return _("created and used with different settings of -fpie");
-  data += 2;
-
-  /* Check target_flags.  */
-  if (targetm.check_pch_target_flags)
-    {
-      int tf;
-      const char *r;
-
-      memcpy (&tf, data, sizeof (target_flags));
-      data += sizeof (target_flags);
-      len -= sizeof (target_flags);
-      r = targetm.check_pch_target_flags (tf);
-      if (r != NULL)
-       return r;
-    }
-
-  for (i = 0; i < cl_options_count; i++)
-    if (option_affects_pch_p (i, &state))
-      {
-       if (memcmp (data, state.data, state.size) != 0)
-         return pch_option_mismatch (cl_options[i].opt_text);
-       data += state.size;
-       len -= state.size;
-      }
-
-  return NULL;
-}
-
 /* Default tree printer.   Handles declarations only.  */
 bool
 default_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
index 925e35777e694b0cd208dd9871565353f9aa05f0..2455dc02263a10357e95242203d227fc05e70422 100644 (file)
@@ -22,11 +22,6 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_TOPLEV_H
 #define GCC_TOPLEV_H
 
-/* If non-NULL, return one past-the-end of the matching SUBPART of
-   the WHOLE string.  */
-#define skip_leading_substring(whole,  part) \
-   (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
-
 /* Decoded options, and number of such options.  */
 extern struct cl_decoded_option *save_decoded_options;
 extern unsigned int save_decoded_options_count;
@@ -46,12 +41,6 @@ extern void init_eh (void);
 
 extern void announce_function (tree);
 
-extern void warn_deprecated_use (tree, tree);
-
-#ifdef BUFSIZ
-extern void output_quoted_string       (FILE *, const char *);
-#endif
-
 extern void wrapup_global_declaration_1 (tree);
 extern bool wrapup_global_declaration_2 (tree);
 extern bool wrapup_global_declarations (tree *, int);
@@ -67,11 +56,6 @@ extern void target_reinit (void);
 /* A unique local time stamp, might be zero if none is available.  */
 extern unsigned local_tick;
 
-/* Top-level source file.  */
-extern const char *main_input_filename;
-extern const char *main_input_basename;
-extern int main_input_baselength;
-
 /* True if the user has tagged the function with the 'section'
    attribute.  */
 
@@ -80,10 +64,7 @@ extern bool user_defined_section_attribute;
 /* See toplev.c.  */
 extern int flag_rerun_cse_after_global_opts;
 
-/* Things to do with target switches.  */
 extern void print_version (FILE *, const char *);
-extern void * default_get_pch_validity (size_t *);
-extern const char * default_pch_valid_p (const void *, size_t);
 
 /* The hashtable, so that the C front ends can pass it to cpplib.  */
 extern struct ht *ident_hash;
index 7944f8c78098432034738d0aa6d53ff05d802410..e3ab9d9278064f61fba5aee8ad66f12d94733afe 100644 (file)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-dump.h"
 #include "tree-pass.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "except.h"
 #include "cfgloop.h"
 #include "cfglayout.h"
index beac4410fdb89649e2fffb5634faac10a24b16d2..7de09390561f9f91774d28c7110db47422a1e8a2 100644 (file)
@@ -32,6 +32,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "tree-iterator.h"
 
+/* If non-NULL, return one past-the-end of the matching SUBPART of
+   the WHOLE string.  */
+#define skip_leading_substring(whole,  part) \
+   (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
+
 static unsigned int queue (dump_info_p, const_tree, int);
 static void dump_index (dump_info_p, unsigned int);
 static void dequeue_and_dump (dump_info_p);
index 2c05835052f27a4a3d3502149432c1e7575aa8d9..97a9869d31ee033841af9c941c2edf80e0a154a2 100644 (file)
@@ -23,7 +23,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "toplev.h" /* floor_log2 */
 #include "diagnostic-core.h"
 #include "tree.h"
 #include "tree-inline.h"
index 2f8d96ef4a2054da68715d6135ebb7835a68e0c6..88666d3e0e8f16d2a210542466121d9d714f5e6b 100644 (file)
@@ -11005,4 +11005,109 @@ typedef_variant_p (tree type)
   return is_typedef_decl (TYPE_NAME (type));
 }
 
+/* Warn about a use of an identifier which was marked deprecated.  */
+void
+warn_deprecated_use (tree node, tree attr)
+{
+  const char *msg;
+
+  if (node == 0 || !warn_deprecated_decl)
+    return;
+
+  if (!attr)
+    {
+      if (DECL_P (node))
+       attr = DECL_ATTRIBUTES (node);
+      else if (TYPE_P (node))
+       {
+         tree decl = TYPE_STUB_DECL (node);
+         if (decl)
+           attr = lookup_attribute ("deprecated",
+                                    TYPE_ATTRIBUTES (TREE_TYPE (decl)));
+       }
+    }
+
+  if (attr)
+    attr = lookup_attribute ("deprecated", attr);
+
+  if (attr)
+    msg = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)));
+  else
+    msg = NULL;
+
+  if (DECL_P (node))
+    {
+      expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
+      if (msg)
+       warning (OPT_Wdeprecated_declarations,
+                "%qD is deprecated (declared at %s:%d): %s",
+                node, xloc.file, xloc.line, msg);
+      else
+       warning (OPT_Wdeprecated_declarations,
+                "%qD is deprecated (declared at %s:%d)",
+                node, xloc.file, xloc.line);
+    }
+  else if (TYPE_P (node))
+    {
+      tree what = NULL_TREE;
+      tree decl = TYPE_STUB_DECL (node);
+
+      if (TYPE_NAME (node))
+       {
+         if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
+           what = TYPE_NAME (node);
+         else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
+                  && DECL_NAME (TYPE_NAME (node)))
+           what = DECL_NAME (TYPE_NAME (node));
+       }
+
+      if (decl)
+       {
+         expanded_location xloc
+           = expand_location (DECL_SOURCE_LOCATION (decl));
+         if (what)
+           {
+             if (msg)
+               warning (OPT_Wdeprecated_declarations,
+                        "%qE is deprecated (declared at %s:%d): %s",
+                        what, xloc.file, xloc.line, msg);
+             else
+               warning (OPT_Wdeprecated_declarations,
+                        "%qE is deprecated (declared at %s:%d)", what,
+                        xloc.file, xloc.line);
+           }
+         else
+           {
+             if (msg)
+               warning (OPT_Wdeprecated_declarations,
+                        "type is deprecated (declared at %s:%d): %s",
+                        xloc.file, xloc.line, msg);
+             else
+               warning (OPT_Wdeprecated_declarations,
+                        "type is deprecated (declared at %s:%d)",
+                        xloc.file, xloc.line);
+           }
+       }
+      else
+       {
+         if (what)
+           {
+             if (msg)
+               warning (OPT_Wdeprecated_declarations, "%qE is deprecated: %s",
+                        what, msg);
+             else
+               warning (OPT_Wdeprecated_declarations, "%qE is deprecated", what);
+           }
+         else
+           {
+             if (msg)
+               warning (OPT_Wdeprecated_declarations, "type is deprecated: %s",
+                        msg);
+             else
+               warning (OPT_Wdeprecated_declarations, "type is deprecated");
+           }
+       }
+    }
+}
+
 #include "gt-tree.h"
index 14fe7aa679932c24fae9c6d47a7bb650fff5c7cf..4995b4384c4bf7c3e947d117010d121c21aee253 100644 (file)
@@ -4959,6 +4959,7 @@ extern tree tree_strip_nop_conversions (tree);
 extern tree tree_strip_sign_nop_conversions (tree);
 extern tree lhd_gcc_personality (void);
 extern void assign_assembler_name_if_neeeded (tree);
+extern void warn_deprecated_use (tree, tree);
 
 \f
 /* In cgraph.c */
index fc996f1f8cd0f93835d5e5d28dfd9ed28e1da03b..5f79ece7001e97233ec39a6b49d4cc055c402326 100644 (file)
@@ -40,7 +40,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "regs.h"
 #include "output.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "hashtab.h"
 #include "ggc.h"
 #include "langhooks.h"
index fa889789e78474294efe1bc7202e9f78af3f366f..ccc1ab810ff74bce50441820ad27f8daac0db66b 100644 (file)
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl.h"
 #include "flags.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "output.h"
 #include "ggc.h"
 #include "target.h"