[LLVMdev] Finding the first line number of a function (-g vs -gline-tables-only)
Diego Novillo
dnovillo at google.com
Tue Nov 26 05:05:12 PST 2013
On Tue, Nov 26, 2013 at 7:47 AM, Diego Novillo <dnovillo at google.com> wrote:
> I want to modify the scanning I do in my pass to skip over all the
> debug setup instruction at the start of the function and latch on the
> first user instruction. Is there a straightforward way to do that?
> Right now I'm tempted to recognize calls to llvm.dbg.declare(), but I
> don't know if that leaves other cases unhandled.
I just found something that might be what I was looking for:
if (Loc.getLine() != 0 && !isa<DbgInfoIntrinsic>(Inst))
Will this do?
Thanks. Diego.
More information about the llvm-dev
mailing list