In using llvm::format() to dump columnar tables of data in my recent enhancements to llvm-objdump, I ran into some issues uncovered by the built bots that show how unsafe llvm::format() is. The issues I hit where that the compiler did not check that %x match the integer size and that %s can match a StringRef but produce the wrong output. To use a StringRef with format() is also ugly because you have to convert to a std::string then call c_str().
All I really needed was a way to generate fixed with hexadecimal (e.g. 0x00001234) and fixed with strings (e.g. right or left justified strings in a column). I whipped up an alternative that is easy to use with the stream operator and generates fixed with output.