<div dir="ltr"><a href="https://reviews.llvm.org/D25107">https://reviews.llvm.org/D25107</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 30, 2016 at 9:55 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu created this revision.<br>
ruiu added a reviewer: zturner.<br>
ruiu added a subscriber: llvm-commits.<br>
<br>
In many cases, clients of PDBFileBuilder generally needs to know<br>
the exact file size before calling PDBFileBuilder::commit() so that<br>
they can create output files with the exact sizes (this is needed<br>
if you are using mmap'ed IO.)<br>
<br>
This patch exposes finalizeMsfLayout and defines getMsf which<br>
returns a MSFLayout object. Because MSFLayout object contains a<br>
superblock which in turn contains the number of blocks, we can<br>
compute the total file size by calling these functions.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D25107" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25107</a><br>
<br>
Files:<br>
  include/llvm/DebugInfo/MSF/<wbr>MSFCommon.h<br>
  include/llvm/DebugInfo/PDB/<wbr>Raw/PDBFileBuilder.h<br>
  lib/DebugInfo/PDB/Raw/<wbr>PDBFileBuilder.cpp<br>
<br>
</blockquote></div><br></div>