diff options
author | Steven Bosscher <stevenb@suse.de> | 2004-01-13 01:58:45 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2004-01-13 01:58:45 +0000 |
commit | faed5cc356c09c41cdbc7de97ef2520c7f5a805d (patch) | |
tree | 620724275961c3e490611bea34f8d2c8cba0a9dd /gcc/function.c | |
parent | e4a32afbe15212baa1f5eab9d0315077ca005a9d (diff) | |
download | gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.zip gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.tar.gz gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.tar.bz2 |
re PR c++/13376 (Incorrect dumps of RTL for passes that use current_function_name)
PR c++/13376
* function.h (struct function): Kill `name' field.
(current_function_name): Make it an extern function.
* function.c (current_function_name): New function.
* graph.c: Update all uses of current_function_name.
* gcse.c: Likewise.
* config/alpha/alpha.c, config/avr/avr.c, config/c4x/c4x.c,
config/mips/mips.c, config/pdp11/pdp11.c: Likewise.
* config/ip2k/ip2k.c (function_prologue): Use MAIN_NAME_P
instead of a strcmp with "main".
From-SVN: r75784
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c index 30ede39..02f095a 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6408,8 +6408,6 @@ allocate_struct_function (tree fndecl) DECL_SAVED_INSNS (fndecl) = cfun; cfun->decl = fndecl; - current_function_name = (*lang_hooks.decl_printable_name) (fndecl, 2); - result = DECL_RESULT (fndecl); if (aggregate_value_p (result, fndecl)) { @@ -8070,4 +8068,11 @@ init_function_once (void) VARRAY_INT_INIT (sibcall_epilogue, 0, "sibcall_epilogue"); } +/* Returns the name of the current function. */ +const char * +current_function_name (void) +{ + return (*lang_hooks.decl_printable_name) (cfun->decl, 2); +} + #include "gt-function.h" |