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

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:38:15 PDT 2017


inglorion accepted this revision.
inglorion added a comment.

lgtm modulo inline comment about messsage in the assert



================
Comment at: llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp:71
+  // is not true of object files.
+  assert(Symbol.length() % 4 == 0);
+  SymbolByteSize += Symbol.length();
----------------
inglorion wrote:
> Can you change this to
> 
>   assert(Symbol.length % 4 == 0 && "Symbol records must be a multiple of 4 bytes when writing PDBs")
> 
> or some such so that we get the explanation right in the error message? Then you can remove the comment.
Please still add a message to the assert here.


https://reviews.llvm.org/D33785





More information about the llvm-commits mailing list