[PATCH] D64999: [yaml2obj] - Change how we handle implicit sections.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 21 23:22:41 PDT 2019
MaskRay added inline comments.
================
Comment at: include/llvm/ObjectYAML/ELFYAML.h:153
+ // When they are, this flag is used to signal about that.
+ bool IsImplicit;
+
----------------
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).
================
Comment at: tools/yaml2obj/yaml2elf.cpp:205
+
+ std::unique_ptr<ELFYAML::Section> Sec = llvm::make_unique<ELFYAML::Section>(
+ ELFYAML::Section::SectionKind::RawContent);
----------------
```
Doc.Sections.emplace_back(ELFYAML::Section::SectionKind::RawContent, true)
Doc.Sections.back()->Name = SecName; // After llvm migrates to C++17, we can leverage the reference return type of emplace_back.
```;
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64999/new/
https://reviews.llvm.org/D64999
More information about the llvm-commits
mailing list