[llvm] [llvm][DebugInfo] formatv in LVCodeViewVisitor (PR #192010)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 00:55:24 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: Konrad Kleine (kwk)

<details>
<summary>Changes</summary>

This relates to #<!-- -->35980.

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


1 Files Affected:

- (modified) llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp (+4-4) 


``````````diff
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
index 3818dc3b9a026..d73d62a07d248 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
@@ -410,7 +410,7 @@ void LVNamespaceDeduction::init() {
       };
       Header();
       for (const StringRef &Item : Container)
-        dbgs() << formatv("'{0}'\n", Item.str().c_str());
+        dbgs() << formatv("'{0}'\n", Item);
     };
 
     Print(DeducedScopes, "Deducted Scopes");
@@ -422,7 +422,7 @@ void LVNamespaceDeduction::init() {
 LVScope *LVNamespaceDeduction::get(LVStringRefs Components) {
   LLVM_DEBUG({
     for (const StringRef &Component : Components)
-      dbgs() << formatv("'{0}'\n", Component.str().c_str());
+      dbgs() << formatv("'{0}'\n", Component);
   });
 
   if (Components.empty())
@@ -458,7 +458,7 @@ LVScope *LVNamespaceDeduction::get(StringRef ScopedName, bool CheckScope) {
     });
 
   LLVM_DEBUG(
-      { dbgs() << formatv("ScopedName: '{0}'\n", ScopedName.str().c_str()); });
+      { dbgs() << formatv("ScopedName: '{0}'\n", ScopedName); });
 
   return get(Components);
 }
@@ -3456,7 +3456,7 @@ void LVLogicalVisitor::printRecords(raw_ostream &OS) const {
         OS << "\n";
       }
     };
-    OS << format("%20s", Name.str().c_str());
+    OS << formatv("{0,20}", Name);
     NewLine();
   };
 

``````````

</details>


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


More information about the llvm-commits mailing list