[PATCH] D91693: [Support] Add reserve() method to the raw_ostream.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 09:25:15 PST 2020
avl added a comment.
> I second the separate class idea. It seems like it could be much cleaner. The normal treatment of reserve-like methods is that of a hint -- one that the implementation could ignore or adjust in some circumstances -- I wouldn't expect that calling this method would completely change the way in which a file is accessed, nor that writing "beyond" the reserved storage would result in an assertion...
What do you think of WriteToStreamLibrayFunc use case? In that context reserve() is not just a hint, but it limits the size of resulting stream. Probably the method name is not good. Would resize() be better ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91693/new/
https://reviews.llvm.org/D91693
More information about the llvm-commits
mailing list