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

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 10:53:28 PDT 2016

majnemer added a comment.

In https://reviews.llvm.org/D22308#483509, @zturner wrote:

> No, and this builder actually overwrites block 1 with the directory block
>  map by default. At some point we'll have to go through the ms code to try
>  to figure out block 1

It's the free page map: https://github.com/Microsoft/microsoft-pdb/blob/master/PDB/msf/msf.cpp#L38

msf.cpp seems to contain much of the FPM manipulation code.

Comment at: include/llvm/DebugInfo/PDB/Raw/MsfBuilder.h:31-32
@@ +30,4 @@
+  explicit MsfBuilder(BumpPtrAllocator &Allocator);
+  Error initialize(uint32_t BlockSize, uint32_t MinBlockCount = 0,
+                   bool CanGrow = true);
What do `CanGrow` and `MinBlockCount` mean?

Comment at: lib/DebugInfo/PDB/Raw/MsfBuilder.cpp:26-27
@@ +25,4 @@
+Error MsfBuilder::initialize(uint32_t BlockSize, uint32_t MinBlockCount,
+                             bool CanGrow) {
+  assert(!IsInitialized && "MsfBuilder is already initialized!");


More information about the llvm-commits mailing list