[LLVMdev] Need more information on llvm.dbg.value call

Devang Patel dpatel at apple.com
Fri Jan 20 09:25:01 PST 2012


On Jan 18, 2012, at 5:47 PM, Eric Christopher wrote:

>> Why is there an 'llvm.dbg.lv.foo' created ?

At optimization level  -O0+ , llvm.dbg.lv.foo is created to collect info of local variables found in function foo. If any variables (or argument) is completely deleted by optimizer or code generator then dwarf writer can use this information to at least provide signature (type, name etc..) of the lost variable/argument.  One of the DIBuider's createLocalVariable() parameter, AlwaysPreserve, enables this.

-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120120/ea77fde5/attachment.html>


More information about the llvm-dev mailing list