Official Lgtm<br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 11, 2017 at 4:48 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br class="gmail_msg">
<br class="gmail_msg">
In <a href="https://reviews.llvm.org/D28519#641938" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28519#641938</a>, @clayborg wrote:<br class="gmail_msg">
<br class="gmail_msg">
> You can't add anything extra to the AsCString() since it returns a "const char *". You can't return a StringRef because it isn't backed by anything. You could return a std::string.<br class="gmail_msg">
><br class="gmail_msg">
> My vote would be to leave AsCString() alone and have it just return a pointer to the string buffer that it owns, and let the formatv stuff do the extra formatting.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
The way I would add it is to add whatever text we want directly to the m_string variable that backs the returned `const char *`. Basically, I believe that if a function has a "natural" string conversion function (which `AsCString` is) then the **default** formatv conversion should be just that (obviously the formatv conversion can do other fancy stuff with the format modifiers, but that's another story).<br class="gmail_msg">
<br class="gmail_msg">
I believe we have converged to keeping this patch as is. If I don't hear any comments, I am going to land this tomorrow.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D28519" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28519</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>