[LLVMdev] Finding the first line number of a function (-g vs -gline-tables-only)
Diego Novillo
dnovillo at google.com
Tue Nov 26 06:01:16 PST 2013
On Tue, Nov 26, 2013 at 7:47 AM, Diego Novillo <dnovillo at google.com> wrote:
> For the sample profiler, I need to determine the location of the first
> user instruction in the function. This can be the LOC where the
> function header is or the LOC of the actual first instruction, it
> doesn't really matter.
Actually, I lied. It turns out that it DOES matter. I need the source
location of the function header itself. So:
1 void
2
3 foo(
4 int x
5
6 )
7
8 {
9 ...
I need '3' to be my base for all the relative offsets I get from the
profiler. So, how do I find out the line number of the symbol 'foo'
itself?
Thanks. Diego.
More information about the llvm-dev
mailing list