[all-commits] [llvm/llvm-project] 7d1cd8: [Support] No longer require flushing raw_string_os...

kepler-5 via All-commits all-commits at lists.llvm.org
Fri Jan 7 09:25:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d1cd8e02636be7f4a177e53c77bb9b80d0f6376
      https://github.com/llvm/llvm-project/commit/7d1cd8e02636be7f4a177e53c77bb9b80d0f6376
  Author: Logan Smith <logan.r.smith0 at gmail.com>
  Date:   2022-01-07 (Fri, 07 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Support/raw_ostream.h
    M llvm/lib/Support/raw_ostream.cpp
    M llvm/unittests/Support/raw_ostream_test.cpp

  Log Message:
  -----------
  [Support] No longer require flushing raw_string_ostream

Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream
has been unbuffered by default, making .flush() a no-op. This diff
formalizes this by no longer .flush()ing in the .str() method or
the destructor. .str() has been marked as "consider removing", since
its primary use case used to be making .flush()+access a one-liner,
and it also has issues such as preventing NRVO/implicit move when used
in return statements.

Differential Revision: https://reviews.llvm.org/D115421




More information about the All-commits mailing list