[PATCH] D115374: [NFC][clang] Return std::strings built from raw_string_ostreams more efficiently

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 9 12:28:11 PST 2021


dexonsmith added a comment.

Returning from https://reviews.llvm.org/D115421, it looks like that `raw_string_ostream` has unbuffered by default since 65b13610a5226b84889b923bae884ba395ad084d <https://reviews.llvm.org/rG65b13610a5226b84889b923bae884ba395ad084d>. Seems like all the new `flush()`s in this patch are no-ops. You can simplify this patch to just mechanically converting `return OS.str()` to `return S`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115374/new/

https://reviews.llvm.org/D115374



More information about the cfe-commits mailing list