Instead of having the special list of implicit sections,
that are mixed with the sections read from YAML on late
stages, I just create the placeholders and add them to
the main sections list early.
That allows to significantly simplify the code.
Paths
| Differential D64999
[yaml2obj] - Change how we handle implicit sections. ClosedPublic Authored by grimar on Jul 19 2019, 8:40 AM.
Details Summary Instead of having the special list of implicit sections, That allows to significantly simplify the code.
Diff Detail Event TimelineComment Actions As an alternative if we do not want to make document non-const, I can introduce a new list of Section * (i.e. it will be almost the same patch like now, just needs an additional list(s). I am not sure how much important to keep the const here, this approach is a bit simpler)
grimar marked 3 inline comments as done. Comment Actions
grimar added inline comments.
This revision is now accepted and ready to land.Jul 22 2019, 4:04 AM Closed by commit rG13a364e1cc9a: [yaml2obj] - Change how we handle implicit sections. (authored by grimar). · Explain WhyJul 22 2019, 5:03 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 211025 include/llvm/ObjectYAML/ELFYAML.h
tools/yaml2obj/yaml2elf.cpp
|
Prefer in-class default member initializer bool IsImplicit = false;
But I think changing the signature to Section(SectionKind Kind, bool IsImplicit) may look better (you'll have to fix 9 ctor calls in this file).