[llvm] [llvm][DebugInfo] formatv in LVCodeViewVisitor (PR #192010)
Konrad Kleine via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 00:54:46 PDT 2026
https://github.com/kwk created https://github.com/llvm/llvm-project/pull/192010
This relates to #35980.
>From 5915373043adc14fa8b10a8b1c2380f8743fa6d8 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine at redhat.com>
Date: Mon, 13 Apr 2026 20:21:58 +0000
Subject: [PATCH] [llvm][DebugInfo] formatv in LVCodeViewVisitor
This relates to #35980.
---
.../DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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();
};
More information about the llvm-commits
mailing list