aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarfout.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-06-17 10:47:22 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-06-17 10:47:22 -0700
commitdf696a75734ea7998d0d5ef75cbafba8be33c908 (patch)
tree4ca10c66a1de94288a6165a609e02cc9122faba6 /gcc/dwarfout.c
parent10cb24df3afa7fa83fecf6c00e7c8f561ffb925c (diff)
downloadgcc-df696a75734ea7998d0d5ef75cbafba8be33c908.zip
gcc-df696a75734ea7998d0d5ef75cbafba8be33c908.tar.gz
gcc-df696a75734ea7998d0d5ef75cbafba8be33c908.tar.bz2
function.h (struct function): Rename profile_label_no.
* function.h (struct function) [funcdef_no]: Rename profile_label_no. (current_function_funcdef_no): Similarly. * function.c (funcdef_no): Similarly. (prepare_function_start): Set current_function_funcdef_no. (expand_function_start): Don't set current_function_profile_label_no. * dwarf2out.h (current_funcdef_number): Remove. * dwarf2out.c (current_funcdef_number): Remove. Replace with current_function_funcdef_no throughout. * dwarfout.c, vmsdbgout.c: Similarly. * except.c (sjlj_funcdef_number): Remove. (sjlj_emit_function_enter): Use current_function_funcdef_no instead. (output_function_exception_table): Likewise. * final.c (profile_function): Use current_function_funcdef_no instead of current_function_profile_label_no. From-SVN: r54709
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r--gcc/dwarfout.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index b63e16c..9dcf6a8 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -756,14 +756,6 @@ static unsigned incomplete_types;
static tree fake_containing_scope;
-/* The number of the current function definition that we are generating
- debugging information for. These numbers range from 1 up to the maximum
- number of function definitions contained within the current compilation
- unit. These numbers are used to create unique labels for various things
- contained within various function definitions. */
-
-static unsigned current_funcdef_number = 1;
-
/* A pointer to the ..._DECL node which we have most recently been working
on. We keep this around just in case something about it looks screwy
and we want to tell the user what the source coordinates for the actual
@@ -3894,13 +3886,14 @@ output_global_subroutine_die (arg)
char label[MAX_ARTIFICIAL_LABEL_BYTES];
low_pc_attribute (function_start_label (decl));
- sprintf (label, FUNC_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, FUNC_END_LABEL_FMT, current_function_funcdef_no);
high_pc_attribute (label);
if (use_gnu_debug_info_extensions)
{
- sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_BEGIN_LABEL_FMT,
+ current_function_funcdef_no);
body_begin_attribute (label);
- sprintf (label, BODY_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_END_LABEL_FMT, current_function_funcdef_no);
body_end_attribute (label);
}
}
@@ -4275,13 +4268,14 @@ output_local_subroutine_die (arg)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
low_pc_attribute (function_start_label (decl));
- sprintf (label, FUNC_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, FUNC_END_LABEL_FMT, current_function_funcdef_no);
high_pc_attribute (label);
if (use_gnu_debug_info_extensions)
{
- sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_BEGIN_LABEL_FMT,
+ current_function_funcdef_no);
body_begin_attribute (label);
- sprintf (label, BODY_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_END_LABEL_FMT, current_function_funcdef_no);
body_end_attribute (label);
}
}
@@ -5809,9 +5803,6 @@ dwarfout_file_scope_decl (decl, set_finalizing)
}
ASM_OUTPUT_POP_SECTION (asm_out_file);
-
- if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl) != NULL)
- current_funcdef_number++;
}
/* Output a marker (i.e. a label) for the beginning of the generated code
@@ -5858,7 +5849,7 @@ dwarfout_end_prologue (line)
return;
function_section (current_function_decl);
- sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_BEGIN_LABEL_FMT, current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}
@@ -5874,7 +5865,7 @@ dwarfout_end_function (line)
if (! use_gnu_debug_info_extensions)
return;
function_section (current_function_decl);
- sprintf (label, BODY_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, BODY_END_LABEL_FMT, current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}
@@ -5890,7 +5881,7 @@ dwarfout_end_epilogue ()
/* Output a label to mark the endpoint of the code generated for this
function. */
- sprintf (label, FUNC_END_LABEL_FMT, current_funcdef_number);
+ sprintf (label, FUNC_END_LABEL_FMT, current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
}