[LLVMdev] llvm dwarf debug info for locals with llvm.dbg.define

Eric Christopher echristo at apple.com
Fri Jul 27 11:22:09 PDT 2012


On Jul 27, 2012, at 2:35 AM, Carlo Kok <ck at remobjects.com> wrote:

> Hi,
> 
> I had a problem with LLVM not emitting local variable info, even though 
> I had calls to llvm.dbg.define. After some tracking I found that the 
> llvm.dbg.declare (and probably value too) have to have a !dbg !nr after 
> them to get emitted at all. maybe someone can adjust 
> http://llvm.org/docs/SourceLevelDebugging.html#format_common_declare 
> that the two llvm.dbg. functions need a !dbg line info associated with them?

I suppose, but a declare isn't too useful unless you know where it was declared.
How were you constructing these declares such that they didn't
have line information?

-eric



More information about the llvm-dev mailing list