[llvm] 65c462a - [llvm][DebugInfo] formatv in LVRange (#192006)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 03:18:01 PDT 2026
Author: Konrad Kleine
Date: 2026-04-14T12:17:56+02:00
New Revision: 65c462aa91e63ca545fd55f81e29f7b57b0a9d3d
URL: https://github.com/llvm/llvm-project/commit/65c462aa91e63ca545fd55f81e29f7b57b0a9d3d
DIFF: https://github.com/llvm/llvm-project/commit/65c462aa91e63ca545fd55f81e29f7b57b0a9d3d.diff
LOG: [llvm][DebugInfo] formatv in LVRange (#192006)
This relates to #35980.
Added:
Modified:
llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp
index 4dc4b588ad60d..1c1e1818d38cc 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp
@@ -13,6 +13,7 @@
#include "llvm/DebugInfo/LogicalView/Core/LVRange.h"
#include "llvm/DebugInfo/LogicalView/Core/LVLocation.h"
#include "llvm/DebugInfo/LogicalView/Core/LVOptions.h"
+#include "llvm/Support/FormatVariadic.h"
using namespace llvm;
using namespace llvm::logicalview;
@@ -81,7 +82,7 @@ void LVRange::addEntry(LVScope *Scope) {
// Get the scope associated with the input address.
LVScope *LVRange::getEntry(LVAddress Address) const {
- LLVM_DEBUG({ dbgs() << format("Searching: 0x%08x\nFound: ", Address); });
+ LLVM_DEBUG({ dbgs() << formatv("Searching: {0:x8}\nFound: ", Address); });
LVScope *Target = nullptr;
LVLevel TargetLevel = 0;
@@ -90,8 +91,9 @@ LVScope *LVRange::getEntry(LVAddress Address) const {
for (LVRangesTree::find_iterator Iter = RangesTree.find(Address),
End = RangesTree.find_end();
Iter != End; ++Iter) {
- LLVM_DEBUG(
- { dbgs() << format("[0x%08x,0x%08x] ", Iter->left(), Iter->right()); });
+ LLVM_DEBUG({
+ dbgs() << formatv("[{0:x8},{1:x8}] ", Iter->left(), Iter->right());
+ });
Scope = Iter->value();
Level = Scope->getLevel();
if (Level > TargetLevel) {
@@ -150,7 +152,7 @@ void LVRange::print(raw_ostream &OS, bool Full) const {
Indentation = options().indentationSize();
if (Indentation)
OS << " ";
- OS << format("[0x%08x,0x%08x] ", RangeEntry.lower(), RangeEntry.upper())
+ OS << formatv("[{0:x8},{1:x8}] ", RangeEntry.lower(), RangeEntry.upper())
<< formattedKind(Scope->kind()) << " " << formattedName(Scope->getName())
<< "\n";
}
More information about the llvm-commits
mailing list