[PATCH] D20876: [PDB] Print section contributions and section map
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 13:41:34 PDT 2016
rnk added inline comments.
================
Comment at: include/llvm/DebugInfo/CodeView/EnumTables.h:27
@@ +26,3 @@
+
+const EnumEntry<uint16_t> RegisterNames[] = {
+ CV_ENUM_CLASS_ENT(RegisterId, Unknown),
----------------
These shouldn't live in headers, they'll be duplicated in all TUs that use them. Probably the best way to expose this would be to declare a function that returns an ArrayRef of register names, and then implement that in the .cpp file, given that we don't want to duplicate the size of the array in the header. Keep the prototypes in the SymbolDumper.h header.
================
Comment at: include/llvm/DebugInfo/PDB/Raw/RawTypes.h:31
@@ +30,3 @@
+// This struct is defined as `SC` in include/dbicommon.h
+struct SectionContr {
+ support::ulittle16_t ISect;
----------------
Is Contr short for Contribution? Maybe Contrib instead of Contr?
================
Comment at: include/llvm/DebugInfo/PDB/Raw/RawTypes.h:44
@@ +43,3 @@
+// This struct is defined as `SC2` in include/dbicommon.h
+struct SectionContr2 : public SectionContr {
+ support::ulittle32_t ISectCoff;
----------------
This isn't "standard layout" unfortunately:
http://en.cppreference.com/w/cpp/concept/StandardLayoutType
ASan actually has a mode that inserts additional padding between fields of non-standard layout types, but it was never productionized. Instead of using inheritance, I'd have the first member be the normal SectionContrib type.
http://reviews.llvm.org/D20876
More information about the llvm-commits
mailing list