This is an archive of the discontinued LLVM Phabricator instance.

[nfc] [lldb] Refactor out DWARFUnit::ContainsDIERef
AbandonedPublic

Authored by jankratochvil on Oct 30 2020, 8:07 AM.

Details

Summary

There is just a difference of comparing DIERef::die_offset() with originally GetOffset() while now with GetFirstDIEOffset().

Diff Detail

Unit TestsFailed

Event Timeline

jankratochvil requested review of this revision.Oct 30 2020, 8:07 AM
jankratochvil created this revision.
labath added a comment.Nov 2 2020, 1:56 AM

Are you planning to use this anywhere else? Could we maybe keep this function inside NameToDIE? There's no such thing as a DIERef in llvm (and I doubt there will be), so it'd be nice to keep this in code which is not destined to be merged some day...

jankratochvil planned changes to this revision.Nov 2 2020, 2:09 AM

I wrote it originally as the function was used at more places. But it no longer is so I just found it as some code cleanup. OK, I will try to update it.

It is no longer too much pretty, feel free to drop it if you think so.

labath added a comment.Nov 2 2020, 8:01 AM

If the DWZ stuff makes this more complicated then it may be worth it. Otherwise, let's just drop it.

lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
53–54

Make this a file-level static (in the cpp file) instead?

jankratochvil abandoned this revision.Nov 2 2020, 8:04 AM

DWZ is no longer using this. OK, dropped. Thanks for the review.