[llvm-dev] Why LLVM doesn't have debug information of function right parentheses?

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 17 12:26:42 PDT 2018


I really wouldn't be sure this is the right direction to go anyway - as
pointed out, there coudl be a return of a constant which would be a single
instruction & it would make more sense to me to attribute that to the line
where "return" is written, than where the closing brace is.

I think this is, for my money, a legitimate difference in implementations
between GCC and Clang - not a case of one being right/better than the other.

(adding echristo@ so he can speak for some of this if he wants to, since
they were choices made a while back)

On Thu, Apr 12, 2018 at 9:11 AM Florian Hahn via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
> On 12/04/2018 15:35, Frozen via llvm-dev wrote:
> > I added one attribute named EndLine in LLVM IR before. LLVM's part is
> > not hard, but will modify many places in Clang. I success for it, you
> > can try this way.
> >
>
> For loops, we use a range to keep track of the start and end of the loop
> for remarks: http://llvm.org/doxygen/classllvm_1_1Loop_1_1LocRange.html
>
> Maybe it would make sense to use something similar for function start
> and end locations?
>
> Cheers,
> Florian
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180417/9a538b20/attachment.html>


More information about the llvm-dev mailing list