[PATCH] D20435: [codeview] Adding support for CodeView types
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 08:13:49 PDT 2016
zturner added a comment.
I'll let someone else comment on the record emission.
================
Comment at: include/llvm/DebugInfo/CodeView/TypeRecord.h:880
@@ -879,1 +879,3 @@
+ static uint32_t getLayoutSize() { return 2 + sizeof(Layout); }
+
----------------
This looks wrong to me. It does not include the length of the name. Also, I would prefer if the `2 + ` were raised somehow, because it is common to every single type of CodeView record, and this logic of knowing that a type record has 2 header bytes should be common somewhere.
Also, each type record knows how to deserialize itself (see the `deserialize` method above), should we centralize the serialization logic here as well using a similar pattern?
http://reviews.llvm.org/D20435
More information about the llvm-commits
mailing list