This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: function name in labels
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: "Jan Hoogerbrugge" <hoogerbrugge at hotmail dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 20 Jan 2004 16:14:39 +0100
- Subject: Re: function name in labels
- References: <BAY9-F1153DMoijoSZl00044df8@hotmail.com>
On Tuesday 20 January 2004 15:20, Jan Hoogerbrugge wrote:
> Hi,
>
> I want to prefix labels in the assembly output with the current function
> name. So
> in function foo(), I would like to have labels such as foo_L1 and foo_L12.
> This
> makes it possible for me to recognize code in the output of profiles. Any
> idea
> where I can find the name of the current function? I tried
> current_function_name() but that does not work when compiling C++.
Try "(*lang_hooks.decl_printable_name) (cfun->decl, 0)".
Gr.
Steven