<div dir="auto">Further, this is why discriminators were created and can be used here. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 15, 2019, 8:14 PM David Blaikie via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dblaikie added a comment.<br>
<br>
In D64033#1586885 <<a href="https://reviews.llvm.org/D64033#1586885" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D64033#1586885</a>>, @wenlei wrote:<br>
<br>
> In D64033#1586625 <<a href="https://reviews.llvm.org/D64033#1586625" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D64033#1586625</a>>, @dblaikie wrote:<br>
><br>
> > What's the motivation for this?<br>
><br>
><br>
> We need to differentiate inline sites on the same line for an internal (basically the tool needs to annotate each instruction with stack of inline site locations). And the missing column info for inline sites gets in the way. I thought the change will be helpful to others as well..<br>
<br>
<br>
For what it's worth, this still won't disambiguate all inline calls (LLVM used to try to use this technique to disambiguate instructions from two different inlined calls & it would fail sometimes even after we forced column info on to help), in this sort of situation:<br>
<br>
  #define FOO x(); x()<br>
  void x();<br>
  int main() {<br>
    FOO;<br>
  }<br>
<br>
Both calls to 'x' will be attributed to the location of the FOO usage, line 4 column 3.<br>
<br>
> <br>
> <br>
>> Should it be conditional on "-gcolumn-info"? (or skipping it in general if the column is zero? that'd make "-gno-column-info" fall out naturally)<br>
>>  (we don't put decl_column on subprogram DIEs, for instance - admittedly, it's more likely the same function could have multiple inline call sites on the same line than you'd have multiple functions defined on the same line)<br>
> <br>
> Good point. Thanks David. I will send a separate patch to skip zero column so we won't have column when "-gno-column-info" is used.<br>
<br>
Cool cool - thanks!<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D64033/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D64033/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D64033" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D64033</a><br>
<br>
<br>
<br>
</blockquote></div>