Introduce StringBuilder utility around raw_string_ostream

Chandler Carruth chandlerc at google.com
Mon Jun 30 15:12:49 PDT 2014


Just as a very small correction to some of the facts here:

On Mon, Jun 30, 2014 at 2:24 PM, Alp Toker <alp at nuanti.com> wrote:

> 1) Uses a non-heap container (SmallString) by default.


std::string has a small-string optimization in both libc++ and, whenever
GCC takes the ABI break and conforms with C++11, libstdc++

So you don't have to use SmallString to avoid heap allocations. The primary
advantage of SmallString is the ability to customize how many bytes are
available in the internal buffer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140630/aeabd0b0/attachment.html>


More information about the llvm-commits mailing list