aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog52
-rw-r--r--gcc/Makefile.in18
-rw-r--r--gcc/c-typeck.c1
-rw-r--r--gcc/common.opt16
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/config/arc/arc.c1
-rw-r--r--gcc/config/arm/arm.c1
-rw-r--r--gcc/config/arm/t-arm2
-rw-r--r--gcc/config/avr/avr.c1
-rw-r--r--gcc/config/bfin/bfin.c1
-rw-r--r--gcc/config/cris/cris.c1
-rw-r--r--gcc/config/crx/crx.c1
-rw-r--r--gcc/config/fr30/fr30.c1
-rw-r--r--gcc/config/frv/frv.c1
-rw-r--r--gcc/config/h8300/h8300.c1
-rw-r--r--gcc/config/ia64/ia64.c1
-rw-r--r--gcc/config/iq2000/iq2000.c1
-rw-r--r--gcc/config/lm32/lm32.c1
-rw-r--r--gcc/config/m32c/m32c.c1
-rw-r--r--gcc/config/m32r/m32r.c1
-rw-r--r--gcc/config/m68hc11/m68hc11.c1
-rw-r--r--gcc/config/m68k/m68k.c1
-rw-r--r--gcc/config/mcore/mcore.c1
-rw-r--r--gcc/config/mep/mep.c1
-rw-r--r--gcc/config/microblaze/microblaze.c1
-rw-r--r--gcc/config/mips/mips.c1
-rw-r--r--gcc/config/mmix/mmix.c1
-rw-r--r--gcc/config/mn10300/mn10300.c1
-rw-r--r--gcc/config/moxie/moxie.c1
-rw-r--r--gcc/config/pa/pa.c1
-rw-r--r--gcc/config/pdp11/pdp11.c1
-rw-r--r--gcc/config/picochip/picochip.c1
-rw-r--r--gcc/config/s390/s390.c1
-rw-r--r--gcc/config/score/score.c1
-rw-r--r--gcc/config/sh/sh.c1
-rw-r--r--gcc/config/sparc/sparc.c1
-rw-r--r--gcc/config/spu/spu.c1
-rw-r--r--gcc/config/spu/t-spu-elf2
-rw-r--r--gcc/config/stormy16/stormy16.c1
-rw-r--r--gcc/config/v850/v850.c1
-rw-r--r--gcc/config/vax/vax.c1
-rw-r--r--gcc/config/xtensa/xtensa.c1
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/Make-lang.in6
-rw-r--r--gcc/cp/cp-objcp-common.c1
-rw-r--r--gcc/cp/lex.c1
-rw-r--r--gcc/cp/typeck.c1
-rw-r--r--gcc/final.c26
-rw-r--r--gcc/gimple-low.c1
-rw-r--r--gcc/graphite-sese-to-poly.c1
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/Make-lang.in2
-rw-r--r--gcc/java/jcf-parse.c1
-rw-r--r--gcc/opts-global.c9
-rw-r--r--gcc/output.h2
-rw-r--r--gcc/plugin.c1
-rw-r--r--gcc/targhooks.c111
-rw-r--r--gcc/targhooks.h3
-rw-r--r--gcc/toplev.c252
-rw-r--r--gcc/toplev.h19
-rw-r--r--gcc/tree-cfg.c1
-rw-r--r--gcc/tree-dump.c5
-rw-r--r--gcc/tree-inline.c1
-rw-r--r--gcc/tree.c105
-rw-r--r--gcc/tree.h1
-rw-r--r--gcc/varasm.c1
-rw-r--r--gcc/xcoffout.c1
67 files changed, 352 insertions, 338 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 56bb534..00e29e2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0852220..a3ea7a3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -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
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 65d255a..77a3864 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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"
diff --git a/gcc/common.opt b/gcc/common.opt
index 57f5b0a..dd672a0 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -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
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 1ecd2c4..76ab31a 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -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"
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index c13eb71..f1afda2 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -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"
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 53a847d..3871460 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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"
diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm
index 4879211..e1aa815 100644
--- a/gcc/config/arm/t-arm
+++ b/gcc/config/arm/t-arm
@@ -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)
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 9e18b00..30e4626 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -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"
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 0abb4eb..93edc88 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -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"
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 49213b6..aec7cba 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -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"
diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c
index d6b9022..79d341c 100644
--- a/gcc/config/crx/crx.c
+++ b/gcc/config/crx/crx.c
@@ -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"
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index 77196c1..74585b5 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -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"
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index f8653c7..56f69e2 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -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"
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 31aa54c..834fc99 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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"
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 878cd72..0c2d20e 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -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"
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index cc4c80f..b838fec 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -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"
diff --git a/gcc/config/lm32/lm32.c b/gcc/config/lm32/lm32.c
index b155697..05888ee 100644
--- a/gcc/config/lm32/lm32.c
+++ b/gcc/config/lm32/lm32.c
@@ -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"
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 659de83..3a74139 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -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"
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 18ac260..4108827 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -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"
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 00d409e..f45de3d 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -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"
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 619cf5c..eedf009 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -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"
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 3c3e1bb..a66eb3c 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -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"
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 96b9eb2..3b11279 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -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"
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 2cd28fc..b50c794 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -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"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 7e7e428..74f7a79 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -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"
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 906bff9..c080116 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -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"
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 709407e..a4e0bc4 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -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"
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index dd8a145..53b73d1 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -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"
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 81d85b9..aa8ad01 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -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"
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index b63d79f..35a76fa 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -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"
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index 20a5b37..1ca95b4 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -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"
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 2580723..df5a246 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -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"
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index f64f3d8..f9e4c0f 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -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"
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 7b87c96..034b171 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -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"
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index bdb44af..85387cc 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -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"
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 92845d7..bdea7e0 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -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"
diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf
index de559c9..cc8c94b 100644
--- a/gcc/config/spu/t-spu-elf
+++ b/gcc/config/spu/t-spu-elf
@@ -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
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index ce83f68..fa5c5b5 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -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"
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 1b3f3e4..6d6ed78 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -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"
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 9459b7f..a9e032a 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -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"
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 67d367c..c3c69fd 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -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"
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 706c974..bfc522a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index e34a1ab..afbf0da 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -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)
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 0fdb87a..f045d290 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -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"
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index c583d7d..5484317 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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"
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 80aa725..7cff632 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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"
diff --git a/gcc/final.c b/gcc/final.c
index c4278ae..ebe21b6 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -3620,6 +3620,32 @@ output_addr_const (FILE *file, rtx x)
}
}
+/* 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 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.
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index dcbb560..d3ec6a7 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -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
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 77930d5..2e56d7a 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -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"
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 2629d20..16ea371 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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.
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 3e3d2c9..f5852b4 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -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) \
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 28d9ad4..9166f311 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -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"
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
index dc462ec..71c428e 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
@@ -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;
diff --git a/gcc/output.h b/gcc/output.h
index 928aa1f..6a835c0 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -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
diff --git a/gcc/plugin.c b/gcc/plugin.c
index 6fd2058..2179b81 100644
--- a/gcc/plugin.c
+++ b/gcc/plugin.c
@@ -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"
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 233a16f..14ec00c 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -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 }
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index ce73f99..1e603c9 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -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);
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3050f07..2cef957 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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,
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 925e357..2455dc0 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -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;
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 7944f8c..e3ab9d9 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -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"
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index beac441..7de0939 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -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);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 2c05835..97a9869 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -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"
diff --git a/gcc/tree.c b/gcc/tree.c
index 2f8d96e..88666d3 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -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"
diff --git a/gcc/tree.h b/gcc/tree.h
index 14fe7aa..4995b43 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -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);
/* In cgraph.c */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index fc996f1..5f79ece 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -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"
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index fa88978..ccc1ab8 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -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"