[PATCH] D33785: [CodeView] Fix alignment / padding when writing symbol records

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 10:09:10 PDT 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

BTW, cvinfo.h does in fact have `#pragma pack ( push, 1 )` in it.

Looks good. :)



================
Comment at: llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp:30
   Limits.pop_back();
+  if (isReading()) {
+    // We would like to assert that we actually read all the bytes that we
----------------
It sounds like we can't have either of these assertions, and I'd rather not have commented out code and this dead if. Can we simplify this to say that some writers (such as MASM) over-allocate for pointer records, and we over-allocate when writing?


https://reviews.llvm.org/D33785





More information about the llvm-commits mailing list