[llvm] [llvm][DebugInfo] formatv in DWARFGdbIndex (PR #191994)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 02:19:56 PDT 2026


================
@@ -24,13 +24,13 @@ using namespace llvm;
 // https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html
 
 void DWARFGdbIndex::dumpCUList(raw_ostream &OS) const {
-  OS << format("\n  CU list offset = 0x%x, has %" PRId64 " entries:",
-               CuListOffset, (uint64_t)CuList.size())
+  OS << formatv("\n  CU list offset = {0:x}, has {1} entries:", CuListOffset,
+                (uint64_t)CuList.size())
----------------
DavidSpickett wrote:

```
SmallVector<CompUnitEntry, 0> CuList;
```
So size should be size_t and formatv will deal with that automatically, you can remove the cast.

https://github.com/llvm/llvm-project/pull/191994


More information about the llvm-commits mailing list