This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Construct nested types on behalf of owner CU
ClosedPublic

Authored by evgeny777 on Feb 28 2019, 8:00 AM.

Diff Detail

Event Timeline

evgeny777 created this revision.Feb 28 2019, 8:00 AM

Would it be possible/practical/reasonable to split getOrCreateTypeDIE at 643, before the createAndAddDIE? And at that point do the switch to the appropriate CU (basically as soon as we get the context DIE and can determine which unit is the appropriate one to build the type DIE in)

Would it be possible/practical/reasonable to split getOrCreateTypeDIE

I think so, but I thought it's easier to do things this way, because AFAIK:

  • DIBaseType and DISubroutineType can't introduce the problem because they're either bound to variable or typedef (DIDerivedType)
  • Using type units also isn't problematic because in such case DINodes are not shareable across CUs

Ok, I'll try splitting and see how it goes

evgeny777 updated this revision to Diff 188888.Mar 1 2019, 5:28 AM

Split getOrCreateTypeDIE

dblaikie accepted this revision.Mar 1 2019, 11:12 AM

Looks great - thanks!

This revision is now accepted and ready to land.Mar 1 2019, 11:12 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2019, 11:14 PM