[PATCH] D58538: [DebugInfo] Add source attributes for function declaration on behalf of owner CU

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 22 14:29:46 PST 2019


dblaikie added a comment.

I think the point where we lookup the other CU and cross over to it should probably be earlier - imagine if all attributes could potentially be CU-local (eg: we could produce a separate string_offsets section for each CU and so have separate strx indexes for each CU) & we should probably have a solution that would be correct in that situation. Does that make sense?

Also, it's helpful to include example source code in the IR file to demonstrate roughly what the LLVM IR metadata is representing/how it was produced in case it needs to be updated at a later date (it's a bit hard to manually edit the LLVM IR).

& FWIW there are 3 cases I know of where this kind of lazy-attachment occurs:

1. Member function template specializations
2. Nested classes
3. Implicit special members (copy ctor, dtor, etc)

it /might/ be easier to demonstrate with one of the other two? But it'll be easier for me to understand once I see the source/reproduction steps written into the test case & I might be able to suggest simplifications along those lines.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58538/new/

https://reviews.llvm.org/D58538





More information about the llvm-commits mailing list