aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>2000-02-29 23:33:50 +0000
committerMartin v. Löwis <loewis@gcc.gnu.org>2000-02-29 23:33:50 +0000
commit00262c8ac76a4805ab153a7ed124fa671fc97fc6 (patch)
tree3761b362baeb6739f75a4be6a85810c78908ab10 /gcc/toplev.c
parentbf44874ee34bf00934f59c3b014d757da0e79523 (diff)
downloadgcc-00262c8ac76a4805ab153a7ed124fa671fc97fc6.zip
gcc-00262c8ac76a4805ab153a7ed124fa671fc97fc6.tar.gz
gcc-00262c8ac76a4805ab153a7ed124fa671fc97fc6.tar.bz2
c-decl.c (current_function_decl): Move to toplev.c.
* c-decl.c (current_function_decl): Move to toplev.c. (init_decl_processing): Don't add current_function_decl as a ggc root here. * dbxout.c (dbxout_symbol): Change return type to int. (dbxout_symbol_location, dbxout_syms): Likewise. (dbxout_block): Don't emit LBRAC/RBRAC pairs for blocks without any locals. Use current_function_func_begin_label if set. * dbxout.h (dbxout_symbol, dbxout_syms): Change return type. * dwarf2out.c (dwarf2out_begin_prologue): Set current_function_func_begin_label. * final.c (final_start_function): Reset it. * toplev.c (current_function_decl): Define it here. (current_function_func_begin_label): New variable. (main): Add both as ggc roots. * tree.h (current_function_func_begin_label): Declare. * ch/decl.c (current_function_decl): Move to toplev.c. * cp/decl.c (current_function_decl): Move to toplev.c. * f/com.c (current_function_decl): Move to toplev.c. * java/decl.c (current_function_decl): Move to toplev.c. From-SVN: r32268
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index bb325df..209fd09 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -307,6 +307,14 @@ int errorcount = 0;
int warningcount = 0;
int sorrycount = 0;
+/* The FUNCTION_DECL for the function currently being compiled,
+ or 0 if between functions. */
+tree current_function_decl;
+
+/* Set to the FUNC_BEGIN label of the current function, or NULL_TREE
+ if none. */
+tree current_function_func_begin_label;
+
/* Pointer to function to compute the name to use to print a declaration.
DECL is the declaration in question.
VERBOSITY determines what information will be printed:
@@ -4607,6 +4615,8 @@ main (argc, argv)
ggc_add_root (&input_file_stack, 1, sizeof input_file_stack,
mark_file_stack);
ggc_add_rtx_root (&stack_limit_rtx, 1);
+ ggc_add_tree_root (&current_function_decl, 1);
+ ggc_add_tree_root (&current_function_func_begin_label, 1);
/* Perform language-specific options intialization. */
lang_init_options ();