[llvm] 34e5b95 - [llvm][DebugInfo] formatv in LVBinaryReader (#192009)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 03:17:13 PDT 2026
Author: Konrad Kleine
Date: 2026-04-14T12:17:08+02:00
New Revision: 34e5b955ddf809feb9ca8fd145e581471f684477
URL: https://github.com/llvm/llvm-project/commit/34e5b955ddf809feb9ca8fd145e581471f684477
DIFF: https://github.com/llvm/llvm-project/commit/34e5b955ddf809feb9ca8fd145e581471f684477.diff
LOG: [llvm][DebugInfo] formatv in LVBinaryReader (#192009)
This relates to #35980.
Added:
Modified:
llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
index 974fbd0997c01..c3d745f3fd113 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
@@ -496,8 +496,8 @@ Error LVBinaryReader::createInstructions(LVScope *Scope,
dbgs() << "\nSectionIndex: " << format_decimal(SectionIndex, 3)
<< " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
<< "Address: " << hexValue(FirstAddress)
- << format(" - Collected instructions lines: %d\n",
- Instructions.size());
+ << formatv(" - Collected instructions lines: {0}\n",
+ Instructions.size());
for (const LVLine *Line : Instructions)
dbgs() << format_decimal(++Index, 5) << ": "
<< hexValue(Line->getOffset()) << ", (" << Line->getName()
@@ -584,7 +584,7 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
LLVM_DEBUG({
size_t Index = 1;
size_t PerLine = 4;
- dbgs() << format("\nProcess debug lines: %d\n", DebugLines->size());
+ dbgs() << formatv("\nProcess debug lines: {0}\n", DebugLines->size());
for (const LVLine *Line : *DebugLines) {
dbgs() << format_decimal(Index, 5) << ": " << hexValue(Line->getOffset())
<< ", (" << Line->getLineNumber() << ")"
@@ -621,8 +621,8 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
size_t Index = 0;
dbgs() << "\nSectionIndex: " << format_decimal(SectionIndex, 3)
<< " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
- << format("Process instruction lines: %d\n",
- InstructionLines.size());
+ << formatv("Process instruction lines: {0}\n",
+ InstructionLines.size());
for (const LVLine *Line : InstructionLines)
dbgs() << format_decimal(++Index, 5) << ": "
<< hexValue(Line->getOffset()) << ", (" << Line->getName()
@@ -649,7 +649,7 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
dbgs() << "Line " << (IsDebug ? "dbg:" : "ins:") << " ["
<< hexValue(DebugAddress) << "]";
if (IsDebug)
- dbgs() << format(" %d", (*Iter)->getLineNumber());
+ dbgs() << formatv(" {0}", (*Iter)->getLineNumber());
dbgs() << "\n";
});
// Instruction address before debug line.
@@ -657,7 +657,7 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
LLVM_DEBUG({
dbgs() << "Inserted instruction address: "
<< hexValue(InstructionAddress) << " before line: "
- << format("%d", (*Iter)->getLineNumber()) << " ["
+ << formatv("{0}", (*Iter)->getLineNumber()) << " ["
<< hexValue(DebugAddress) << "]\n";
});
Iter = DebugLines->insert(Iter, InstructionLine);
@@ -681,7 +681,7 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
}
LLVM_DEBUG({
- dbgs() << format("Lines after merge: %d\n", DebugLines->size());
+ dbgs() << formatv("Lines after merge: {0}\n", DebugLines->size());
size_t Index = 0;
for (const LVLine *Line : *DebugLines) {
dbgs() << format_decimal(++Index, 5) << ": "
@@ -706,7 +706,7 @@ void LVBinaryReader::processLines(LVLines *DebugLines,
size_t Index = 0;
dbgs() << "\nSectionIndex: " << format_decimal(SectionIndex, 3)
<< " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
- << format("Instruction lines: %d\n", Lines->size());
+ << formatv("Instruction lines: {0}\n", Lines->size());
for (const LVLine *Line : *Lines)
dbgs() << format_decimal(++Index, 5) << ": "
<< hexValue(Line->getOffset()) << ", (" << Line->getName()
@@ -901,7 +901,7 @@ void LVBinaryReader::includeInlineeLines(LVSectionIndex SectionIndex,
for (const LVLine *Line : *InlineeLines)
dbgs() << "[" << hexValue(Line->getAddress()) << "] "
<< Line->getLineNumber() << "\n";
- dbgs() << format("Debug lines: %d\n", CULines.size());
+ dbgs() << formatv("Debug lines: {0}\n", CULines.size());
for (const LVLine *Line : CULines)
dbgs() << "Line address: " << hexValue(Line->getOffset()) << ", ("
<< Line->getLineNumber() << ")\n";
@@ -938,7 +938,7 @@ void LVBinaryReader::includeInlineeLines(LVSectionIndex SectionIndex,
}
LLVM_DEBUG({
dbgs() << "Merged Inlined lines for: " << Function->getName() << "\n";
- dbgs() << format("Debug lines: %d\n", CULines.size());
+ dbgs() << formatv("Debug lines: {0}\n", CULines.size());
for (const LVLine *Line : CULines)
dbgs() << "Line address: " << hexValue(Line->getOffset()) << ", ("
<< Line->getLineNumber() << ")\n";
More information about the llvm-commits
mailing list