[PATCH] D22308: [pdb] Introduce an MsfBuilder class for laying out PDB files

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 13:12:15 PDT 2016


zturner added inline comments.

================
Comment at: lib/DebugInfo/PDB/Raw/MsfBuilder.cpp:27-28
@@ +26,4 @@
+Error MsfBuilder::initialize(uint32_t BlockSize, uint32_t MinBlockCount,
+                             bool CanGrow) {
+  assert(!IsInitialized && "MsfBuilder is already initialized!");
+
----------------
ruiu wrote:
> So you don't like it, Zach?
You mean merging it with the constructor?  The problem is that it's possible to pass an invalid block size, so I didn't want to make it possible to construct an instance of an `MsfBuilder` with an incorrect block size.  If you use the constructor, there is no way to pass the error back to the user.  I could make an enum for the block size, but I wasn't convinced that was better.


https://reviews.llvm.org/D22308





More information about the llvm-commits mailing list