[lldb-dev] raw c strings in lldb

Zachary Turner zturner at google.com
Wed Feb 11 11:52:26 PST 2015


On Wed Feb 11 2015 at 11:13:22 AM Greg Clayton <gclayton at apple.com> wrote:

>
> > Operations:
> > strcpy, strncpy, etc         // Use member functions of SmallString /
> StringRef
> > sprintf, snprintf, etc       // Use llvm::raw_ostream
>
> We have StringStream, people should be using that. raw_ostream doesn't
> support all printf style formats. So all sprintf  and snprintf function
> calls should switch to using lldb_private::StreamString.
>

What if llvm::SmallString<> had Format methods that delegated to snprintf
etc?  Then everything would just work, and it would integrate nicely with
the rest of my suggested points such as converting things to StringRef,
SmallVectorImpl, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150211/59781a6b/attachment.html>


More information about the lldb-dev mailing list