[llvm] [llvm][DebugInfo] formatv in DWARFUnwindTablePrinter (PR #191999)

Konrad Kleine via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 00:49:06 PDT 2026


https://github.com/kwk created https://github.com/llvm/llvm-project/pull/191999

This relates to #35980.

>From f608844c39490dfafab6e9cdaeadca1f63917269 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine at redhat.com>
Date: Mon, 13 Apr 2026 20:20:10 +0000
Subject: [PATCH] [llvm][DebugInfo] formatv in DWARFUnwindTablePrinter

This relates to #35980.
---
 llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp
index bdcda266ea69d..90ed1b5c70725 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp
@@ -12,6 +12,7 @@
 #include "llvm/DebugInfo/DWARF/DWARFExpressionPrinter.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/Format.h"
+#include "llvm/Support/FormatVariadic.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cassert>
 #include <cinttypes>
@@ -153,7 +154,7 @@ static void printUnwindRow(const UnwindRow &Row, raw_ostream &OS,
                            DIDumpOptions DumpOpts, unsigned IndentLevel) {
   OS.indent(2 * IndentLevel);
   if (Row.hasAddress())
-    OS << format("0x%" PRIx64 ": ", Row.getAddress());
+    OS << formatv("{0:x}: ", Row.getAddress());
   OS << "CFA=";
   printUnwindLocation(Row.getCFAValue(), OS, DumpOpts);
   if (Row.getRegisterLocations().hasLocations()) {



More information about the llvm-commits mailing list