[PATCH] Teach llvm::format_hex() to support formatting without a prefix '0x'

Rui Ueyama ruiu at google.com
Fri Jan 23 13:58:46 PST 2015


Why does format_hex prints out "0x" prefix in the first place? If it
doesn't, like printf %x, we don't need an extra parameter or a separate
function. It may be too late, though.

On Fri, Jan 23, 2015 at 1:46 PM, Chandler Carruth <chandlerc at google.com>
wrote:

> Yea, formatting should just support this...
>
> On Fri, Jan 23, 2015 at 1:18 PM, Zachary Turner <zturner at google.com>
> wrote:
>
>> In http://reviews.llvm.org/D7151#112909, @majnemer wrote:
>>
>> > Why not just use `llvm::utohexstr`?
>>
>>
>> Isn't that less efficient than just writing directly to the stream?
>> Results in one heap allocation for every byte.
>>
>>
>> http://reviews.llvm.org/D7151
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/ea2fa53b/attachment.html>


More information about the llvm-commits mailing list