According to https://reviews.llvm.org/D68575#inline-617586, I create a NFC patch for it.
- Using crtp to refactor the xcoff section header
- Move the define of SectionFlagsReservedMask and SectionFlagsTypeMask from XCOFFDumper.cpp to XCOFFObjectFile.h
Paths
| Differential D69131
[NFC][XCOFF] Using crtp to refactor the xcoff section header ClosedPublic Authored by DiggerLin on Oct 17 2019, 12:42 PM.
Details Summary According to https://reviews.llvm.org/D68575#inline-617586, I create a NFC patch for it.
Diff Detail
Event TimelineComment Actions General comments about the direction of this patch: I think the direction suggested in D68575 makes more sense, as those two constant values are more related to object format, and we would want to use them in more than llvm toolings. Comment Actions
if both xcoffobjectfilewriter.cpp and xcoffobjectfile.cpp use these two constant, I agreed to put them in the xcoff.h but I do not think we will use them in the xcoffobjectfilewriter.cpp(that is means they only use in xcoff decode tools, if only use in the xcoff decode tool, it is better to put them in the xcoffobjectfile.h). Comment Actions LGTM with minor comments.
This revision is now accepted and ready to land.Oct 30 2019, 1:01 PM Closed by commit rGc63c1a72dab9: Using crtp to refactor the xcoff section header (authored by DiggerLin). · Explain WhyNov 7 2019, 8:55 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 228258 llvm/include/llvm/Object/XCOFFObjectFile.h
llvm/lib/Object/XCOFFObjectFile.cpp
llvm/tools/llvm-readobj/XCOFFDumper.cpp
|
Typo: s/Setion/Section/;
Since the base class does not represent a section header by itself, name this something like XCOFFSectionHeaderBase.