[llvm] 75d74ee - [llvm][DebugInfo] Use formatv in LVReader (#192007)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 06:46:13 PDT 2026


Author: Konrad Kleine
Date: 2026-04-15T15:46:06+02:00
New Revision: 75d74ee6d59cdb667d2cd490c52e42efec2ce850

URL: https://github.com/llvm/llvm-project/commit/75d74ee6d59cdb667d2cd490c52e42efec2ce850
DIFF: https://github.com/llvm/llvm-project/commit/75d74ee6d59cdb667d2cd490c52e42efec2ce850.diff

LOG: [llvm][DebugInfo] Use formatv in LVReader (#192007)

This relates to #35980.

Added: 
    

Modified: 
    llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
index d973a47f68732..6c4f803d93c8b 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
@@ -71,21 +71,21 @@ bool checkIntegrityScopesTree(LVScope *Root) {
 
     auto PrintIndex = [](unsigned Index) {
       if (Index)
-        dbgs() << format("%8d: ", Index);
+        dbgs() << formatv("{0,8}: ", Index);
       else
-        dbgs() << format("%8c: ", ' ');
+        dbgs() << formatv("{0,8}: ", ' ');
     };
     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;


        


More information about the llvm-commits mailing list