This is an archive of the discontinued LLVM Phabricator instance.

[DWARFYAML][debug_info] Pull out dwarf::FormParams from DWARFYAML::Unit.
ClosedPublic

Authored by Higuoxing on Aug 5 2020, 5:45 AM.

Details

Summary

Unit.Format, Unit.Version and Unit.AddrSize are replaced with
dwarf::FormParams in D84496 to get rid of unnecessary functions
getOffsetSize() and getRefSize(). However, that change makes it
difficult to make AddrSize optional (Optional<uint8_t>). This change
pulls out dwarf::FormParams from DWARFYAML::Unit and use it as a helper
struct in DWARFYAML::emitDebugInfo().

Diff Detail

Event Timeline

Higuoxing created this revision.Aug 5 2020, 5:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2020, 5:45 AM
Higuoxing requested review of this revision.Aug 5 2020, 5:45 AM
Higuoxing added inline comments.Aug 5 2020, 5:50 AM
llvm/lib/ObjectYAML/DWARFEmitter.cpp
385

I will remove the (uint8_t)

Higuoxing updated this revision to Diff 283473.Aug 5 2020, 7:13 PM

Remove (uint8_t).

MaskRay accepted this revision.Aug 5 2020, 11:31 PM

LGTM.

This revision is now accepted and ready to land.Aug 5 2020, 11:31 PM
jhenderson accepted this revision.Aug 6 2020, 1:17 AM

LGTM too.

Thanks for reviewing!

This revision was landed with ongoing or failed builds.Aug 6 2020, 1:39 AM
This revision was automatically updated to reflect the committed changes.