This is an archive of the discontinued LLVM Phabricator instance.

[yaml2elf] - Refactoring followup for D62809
ClosedPublic

Authored by grimar on Jun 5 2019, 8:47 AM.

Details

Summary

This is a refactoring follow-up for D62809 "Change how we handle implicit sections.".
It allows to simplify the code.

Diff Detail

Event Timeline

grimar created this revision.Jun 5 2019, 8:47 AM
jhenderson added inline comments.Jun 6 2019, 2:58 AM
tools/yaml2obj/yaml2elf.cpp
313

It's not immediately obvious from reading the code that Sec can only be nullptr if it is an implicit section. I wonder if it would be clearer to the future reader to add an explicit assert somewhere around here to document that point?

grimar updated this revision to Diff 203320.Jun 6 2019, 3:16 AM
grimar marked an inline comment as done.
  • Addressed review comment.
tools/yaml2obj/yaml2elf.cpp
313

Added an assert.

jhenderson accepted this revision.Jun 6 2019, 3:45 AM
This revision is now accepted and ready to land.Jun 6 2019, 3:45 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2019, 1:30 AM