[PATCH] D25107: Expose PDBFileBuilder::finalizeMsfLayout.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 10:32:59 PDT 2016
zturner added inline comments.
> PDBFileBuilder.h:53
>
> -private:
> - Expected<msf::MSFLayout> finalizeMsfLayout() const;
> + Error finalizeMsfLayout();
>
I'm not sure if making this public is a good idea. This leaves open the possibility that someone could mis-use the class.
I can think of two solutions that would still keep this private:
1. Changing `commit` so that instead of taking an `msf::WritableStream` it takes a filename. Then you create the stream in there.
2. Change the implementation of `FileBufferByteStream` so that instead of taking a `FileOutputBuffer` to its constructor, it only takes a filename. Add a method to that class called `create(uint64_t size)`. Then the signature of `commit` is changed to take an `msf::FileBufferByteStream` and after internally finalizing the layout, it calls `stream.create(layout.size)`.
What do you think?
https://reviews.llvm.org/D25107
More information about the llvm-commits
mailing list