aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.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/dwarf2out.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/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 18a17e0..744f7ee 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -103,13 +103,6 @@ dwarf2out_do_frame ()
);
}
-/* The number of the current function definition for which debugging
- information is being generated. 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 label id's
- unique to each function definition. */
-unsigned current_funcdef_number = 0;
-
/* The size of the target's pointer type. */
#ifndef PTR_SIZE
#define PTR_SIZE (POINTER_SIZE / BITS_PER_UNIT)
@@ -2115,12 +2108,11 @@ dwarf2out_begin_prologue (line, file)
return;
#endif
- current_funcdef_number++;
function_section (current_function_decl);
ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
current_function_func_begin_label = get_identifier (label);
#ifdef IA64_UNWIND_INFO
@@ -2147,7 +2139,7 @@ dwarf2out_begin_prologue (line, file)
fde->dw_fde_current_label = NULL;
fde->dw_fde_end = NULL;
fde->dw_fde_cfi = NULL;
- fde->funcdef_number = current_funcdef_number;
+ fde->funcdef_number = current_function_funcdef_no;
fde->nothrow = current_function_nothrow;
fde->uses_eh_lsda = cfun->uses_eh_lsda;
@@ -2173,7 +2165,8 @@ dwarf2out_end_epilogue ()
/* Output a label to mark the endpoint of the code generated for this
function. */
- ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL, current_funcdef_number);
+ ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL,
+ current_function_funcdef_no);
ASM_OUTPUT_LABEL (asm_out_file, label);
fde = &fde_table[fde_table_in_use - 1];
fde->dw_fde_end = xstrdup (label);
@@ -10343,10 +10336,10 @@ gen_subprogram_die (decl, context_die)
equate_decl_number_to_die (decl, subr_die);
ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_BEGIN_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
add_AT_lbl_id (subr_die, DW_AT_low_pc, label_id);
ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_END_LABEL,
- current_funcdef_number);
+ current_function_funcdef_no);
add_AT_lbl_id (subr_die, DW_AT_high_pc, label_id);
add_pubname (decl, subr_die);
@@ -11904,7 +11897,7 @@ dwarf2out_source_line (line, filename)
= &separate_line_info_table[separate_line_info_table_in_use++];
line_info->dw_file_num = lookup_filename (filename);
line_info->dw_line_num = line;
- line_info->function = current_funcdef_number;
+ line_info->function = current_function_funcdef_no;
}
else
{