Displaying 2 results from an estimated 2 matches for "format_decimal".
2016 Oct 12
2
RFC: General purpose type-safe formatting library
...ld include it.
>
We were discussing this on IRC chat the other night, but I believe many
people underestimate the need for string formatting. Here are some data
points:
1. There are currently 1,637 calls to llvm::format() across the codebase,
and this doesn't include calls to format_hex(), format_decimal(), and the
other variants.
2. LLVM consists of a large number (20+ at a minimum) of focused tools
(llc, lli, llvm-dwarfdump, llvm-objdump, etc) whose sole purpose is to
output formatted text. Consider the use case of printing a verbose
disassembly listing which is fed into FileCheck.
3. Even the &...
2016 Oct 12
15
RFC: General purpose type-safe formatting library
A while back llvm::format() was introduced that made it possible to combine
printf-style formatting with llvm streams. However, this still comes with
all the risks and pitfalls of printf. Everyone is no-doubt familiar with
these problems, but here are just a few anyway:
1. *Not type-safe.* Not all compilers warn when you mess up the format
specifier. And when you're writing your own