https://github.com/kwk created https://github.com/llvm/llvm-project/pull/192007
This relates to #35980.
>From ba8e21d87218c9283fc29ac29ccc5911c93313e2 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine at redhat.com>
Date: Mon, 13 Apr 2026 20:21:16 +0000
Subject: [PATCH] [llvm][DebugInfo] formatv in LVReader
This relates to #35980.
---
llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
index d973a47f68732..8273149f6fe63 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
@@ -70,22 +70,19 @@ bool checkIntegrityScopesTree(LVScope *Root) {
});
auto PrintIndex = [](unsigned Index) {
- if (Index)
- dbgs() << format("%8d: ", Index);
- else
- dbgs() << format("%8c: ", ' ');
+ dbgs() << formatv("{0,8}: ", Index ? Index : ' ');
};
auto PrintElement = [&](LVElement *Element, unsigned Index = 0) {
PrintIndex(Index);
std::string ElementName(Element->getName());
- dbgs() << format("%15s ID=0x%08x '%s'\n", Element->kind(),
- Element->getID(), ElementName.c_str());
+ dbgs() << formatv("{0,15} ID={1:x8} '{2}'\n", Element->kind(),
+ Element->getID(), ElementName);
};
std::string RootName(Root->getName());
dbgs() << formatv("{0}\n", fmt_repeat('=', 72));
- dbgs() << format("Root: '%s'\nDuplicated elements: %d\n", RootName.c_str(),
- Duplicate.size());
+ dbgs() << formatv("Root: '{0}'\nDuplicated elements: {1}\n",
+ RootName, Duplicate.size());
dbgs() << formatv("{0}\n", fmt_repeat('=', 72));
unsigned Index = 0;