<div dir="ltr">Bug #15076.<div><br></div><div style>Thanks,</div><div style>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 25, 2013 at 6:41 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Fri, Jan 25, 2013 at 3:42 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Fri, Jan 11, 2013 at 9:25 AM, Peter Ohmann <<a href="mailto:ohmann@cs.wisc.edu" target="_blank">ohmann@cs.wisc.edu</a>> wrote:<br>



> Hello all,<br>
><br>
> While I understand that debug data is best-effort, I am running into some<br>
> trouble with an analysis tool I'm building partially using an LLVM pass.<br>
> There are two (seemingly directly related) cases where debug data is not<br>
> missing (which wouldn't be a problem for me) but very misleading.<br>
><br>
> First, in the case of multi-line statements, clang will assign the debug<br>
> data for each expression to be the first line of the statement but continue<br>
> incrementing the column number past the number of columns on the line.  The<br>
> following code gives an example:<br>
> [1] int foo(){<br>
> [2]   int x, y, z;<br>
> [3]   if(x < y ||<br>
> [4]      y < z){<br>
> [5]     x++;<br>
> [6]   }<br>
> [7] }<br>
> In this example, when my LLVM pass gets the bitcode both the (x<y) and (y<z)<br>
> expressions are assigned DebugLocs which have line number 3 (but with<br>
> increasing column numbers).<br>
<br>
</div>When I try this, in the IR produced by 'clang -g', they both have line<br>
3 column 0. If I use 'clang -g -gcolumn-info', they both have line 3<br>
column 3 (the location of the 'if' token). That seems to make somewhat<br>
more sense, but is still probably not what we want.<br></blockquote><div><br></div></div></div><div>Yeah, not so much.</div><div><br></div><div>Peter: If you get a chance to file a bug in bugzilla so we can track it I'd appreciate it.</div>


<div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-eric </div></font></span></div></div></div>
</blockquote></div><br></div>