Yes I can have it return an error if it's already been called.<br><br>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.<br><br>In any case, having it return an Error on subsequent calls to build is fine, I can do that<br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 13, 2016 at 3:51 PM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br>
<br>
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.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D22308" rel="noreferrer" target="_blank">http://reviews.llvm.org/D22308</a><br>
<br>
<br>
<br>
</blockquote></div>