Skip to content

[llvm][DebugInfo] Use formatv in LVCompare#192001

Merged
kwk merged 3 commits intollvm:mainfrom
kwk:format-19
Apr 15, 2026
Merged

[llvm][DebugInfo] Use formatv in LVCompare#192001
kwk merged 3 commits intollvm:mainfrom
kwk:format-19

Conversation

@kwk
Copy link
Copy Markdown
Contributor

@kwk kwk commented Apr 14, 2026

This relates to #35980.

Here are all independent PRs that deal with replacing format with formatv in llvm/lib/DebugInfo:

@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Apr 14, 2026

@llvm/pr-subscribers-debuginfo

Author: Konrad Kleine (kwk)

Changes

This relates to #35980.


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

1 Files Affected:

  • (modified) llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp (+2-2)
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
index 3cb2662f2f313..65e28fd27e1fa 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
@@ -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);
   };
   auto PrintDataRow = [&](const char *T, unsigned U, unsigned V, unsigned W) {
-    OS << format("%-9s%9d  %9d  %9d\n", T, U, V, W);
+    OS << formatv("{0, -9}{1,9}  {2,9}  {3,9}\n", T, U, V, W);
   };
 
   OS << "\n";

This was referenced Apr 14, 2026
Comment thread llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp Outdated
In earlier PRs we decided to not specify the default separator
explicitly again.
@kwk kwk changed the title [llvm][DebugInfo] formatv in LVCompare [llvm][DebugInfo] Use formatv in LVCompare Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kwk kwk merged commit da8abd8 into llvm:main Apr 15, 2026
10 checks passed
@kwk kwk deleted the format-19 branch April 15, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants