[llvm] [llvm][DebugInfo] Use formatv() instead of format() (PR #191308)

Konrad Kleine via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 04:52:21 PDT 2026


================
@@ -185,15 +185,15 @@ bool AppleAcceleratorTable::dumpName(ScopedPrinter &W,
     return false; // End of list
 
   DictScope NameScope(W, ("Name at 0x" + Twine::utohexstr(NameOffset)).str());
-  W.startLine() << format("String: 0x%08" PRIx64, StringOffset);
+  W.startLine() << formatv("String: {0:x+8}", StringOffset);
   W.getOStream() << " \"" << StringSection.getCStr(&StringOffset) << "\"\n";
 
   unsigned NumData = AccelSection.getU32(DataOffset);
   for (unsigned Data = 0; Data < NumData; ++Data) {
     ListScope DataScope(W, ("Data " + Twine(Data)).str());
     unsigned i = 0;
     for (auto &Atom : AtomForms) {
-      W.startLine() << format("Atom[%d]: ", i);
+      W.startLine() << formatv("Atom[{0:d}]: ", i);
----------------
kwk wrote:

Addressed in https://github.com/llvm/llvm-project/commit/bd36b59f2dc168befbfed9487e3095f74ce99bce.

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


More information about the llvm-commits mailing list