Introduce StringBuilder utility around raw_string_ostream

Rafael EspĂ­ndola rafael.espindola at
Thu Jun 12 07:03:17 PDT 2014

On 12 June 2014 09:54, Chandler Carruth <chandlerc at> wrote:
> How about an even simpler approach.
> Put a std::string inside raw_string_ostream, and a default constructor which
> binds the reference to its internal std::string. I'm moderately confident
> that our optimizers will remove the "dead" std::string that is left in the
> class by users that want to leverage external storage.
> This has the advantage of not introducing any new types or patterns, merely
> removing the requirement to pass in a std::string to provide storage by
> using internal storage.
> That's getting far enough down in the simplicity (for folks learning about
> the APIs) to make me quite happy.

I like it!


More information about the llvm-commits mailing list