<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 18, 2012, at 5:47 PM, Eric Christopher wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><blockquote type="cite"><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; display: inline !important; ">Why is there an 'llvm.dbg.lv.foo' created ?</span></blockquote></span></blockquote></div><br><div>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.</div><div><br></div><div>-</div><div>Devang</div></body></html>