[llvm] [llvm][DebugInfo] Use formatv() instead of format() (PR #191308)
Konrad Kleine via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 00:23:04 PDT 2026
================
@@ -30,19 +32,20 @@ uint8_t DWARFDebugMacro::MacroHeader::getOffsetByteSize() const {
void DWARFDebugMacro::MacroHeader::dumpMacroHeader(raw_ostream &OS) const {
// FIXME: Add support for dumping opcode_operands_table
- OS << format("macro header: version = 0x%04" PRIx16, Version)
- << format(", flags = 0x%02" PRIx8, Flags)
+ OS << formatv("macro header: version = {0:x+4}", Version)
+ << formatv(", flags = {0:x+2}", Flags)
<< ", format = " << FormatString(getDwarfFormat());
if (Flags & MACRO_DEBUG_LINE_OFFSET)
- OS << format(", debug_line_offset = 0x%0*" PRIx64, 2 * getOffsetByteSize(),
- DebugLineOffset);
+ OS << formatv(", debug_line_offset = 0x{0:x-}",
----------------
kwk wrote:
That is correct. It is because of the filler.
https://github.com/llvm/llvm-project/pull/191308
More information about the llvm-commits
mailing list