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

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 15:57:43 PDT 2016


Yes I can have it return an error if it's already been called.

Calling it twice is useful for writing unit tests when you want to test
that 2 slightly different configurations differ in the expected way. But it
already doesn't work since it was difficult to do so in my current unit
tests i use 2 builders which are configured the same way except for one
thing.

In any case, having it return an Error on subsequent calls to build is
fine, I can do that
On Wed, Jul 13, 2016 at 3:51 PM Rui Ueyama <ruiu at google.com> wrote:

> ruiu added a comment.
>
> You can return an Error on second and subsequent calls of `build()`, no? I
> don't see a reason to allow users to call `build()` multiple times. If they
> want to create multiple MSF headers, they can simply create as many
> MsfBuilder instances they want, and call `build()` only once for each
> instance.
>
>
> http://reviews.llvm.org/D22308
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160713/81d014fb/attachment-0001.html>


More information about the llvm-commits mailing list