[llvm] [llvm][DebugInfo] formatv in LVCompare (PR #192001)

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


================
@@ -405,10 +405,10 @@ void LVCompare::printSummary() const {
   auto PrintSeparator = [&]() { OS << Separator << "\n"; };
   auto PrintHeadingRow = [&](const char *T, const char *U, const char *V,
                              const char *W) {
-    OS << format("%-9s%9s  %9s  %9s\n", T, U, V, W);
+    OS << formatv("{0, -9}{1,9}  {2,9}  {3,9}\n", T, U, V, W);
----------------
DavidSpickett wrote:

Explain to me why the first one needs a space in `{0, -9}` but the other ones do not. Something to do with the first one being negative?

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


More information about the llvm-commits mailing list