[all-commits] [llvm/llvm-project] 875b3b: [Support] Add reserve() method to the raw_ostream.
avl-llvm via All-commits
all-commits at lists.llvm.org
Tue Feb 23 03:07:42 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 875b3b2cdda105c01af9a1330b1cb6a3f1e1b822
https://github.com/llvm/llvm-project/commit/875b3b2cdda105c01af9a1330b1cb6a3f1e1b822
Author: Alexey Lapshin <a.v.lapshin at mail.ru>
Date: 2021-02-23 (Tue, 23 Feb 2021)
Changed paths:
M llvm/include/llvm/Support/raw_ostream.h
M llvm/unittests/Support/raw_ostream_test.cpp
Log Message:
-----------
[Support] Add reserve() method to the raw_ostream.
If resulting size of the output stream is already known,
then the space for stream data could be preliminary
allocated in some cases. f.e. raw_string_ostream could
preallocate the space for the target string(it allows
to avoid reallocations during writing into the stream).
Differential Revision: https://reviews.llvm.org/D91693
More information about the All-commits
mailing list