Page MenuHomePhabricator

[NFC] Refactor `GetDWARFDeclContext` to return `DWARFDeclContext`
ClosedPublic

Authored by jankratochvil on Jan 31 2020, 8:01 AM.

Details

Summary

In D70646 I broke http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/7400/ so this is a second attempt.
Unfortunately I do not have reproducible the breakage of Green Dragon locally.
The bug was that DWARFDebugInfoEntry::GetDWARFDeclContext reversed order of the items, that is fixed now.
OK for check-in? It is no longer so pretty but still worth it IMO.

Diff Detail

Event Timeline

jankratochvil created this revision.Jan 31 2020, 8:01 AM
labath accepted this revision.Feb 5 2020, 8:50 AM

Yes, I agree this is better.

One way to this could be improved further is to change the recursion in GetDWARFDeclContext into a loop (then you wouldn't need the extra wrapper).

This revision is now accepted and ready to land.Feb 5 2020, 8:50 AM
jankratochvil planned changes to this revision.Feb 5 2020, 11:56 AM
This revision is now accepted and ready to land.Feb 6 2020, 10:17 AM

One way to this could be improved further is to change the recursion in GetDWARFDeclContext into a loop (then you wouldn't need the extra wrapper).

True, I am stupid. But then I find there a need for the static method (as having this and iterating die pointer is error-prone).

This looks good too.

This revision was automatically updated to reflect the committed changes.