[llvm] 3d0d615 - [llvm][DebugInfo] Use formatv in LVDWARFReader (#192011)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 05:03:54 PDT 2026


Author: Konrad Kleine
Date: 2026-04-16T14:03:48+02:00
New Revision: 3d0d615d2a415a3dd7f79f4dbe481cc36f8073d5

URL: https://github.com/llvm/llvm-project/commit/3d0d615d2a415a3dd7f79f4dbe481cc36f8073d5
DIFF: https://github.com/llvm/llvm-project/commit/3d0d615d2a415a3dd7f79f4dbe481cc36f8073d5.diff

LOG: [llvm][DebugInfo] Use formatv in LVDWARFReader (#192011)

This relates to #35980.

Added: 
    

Modified: 
    llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
index 772d821dcda81..3a253b3cef9b8 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
@@ -21,6 +21,7 @@
 #include "llvm/DebugInfo/LogicalView/Core/LVSymbol.h"
 #include "llvm/DebugInfo/LogicalView/Core/LVType.h"
 #include "llvm/Object/MachO.h"
+#include "llvm/Support/FormatAdapters.h"
 #include "llvm/Support/FormatVariadic.h"
 
 using namespace llvm;
@@ -210,7 +211,7 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
           FoundLowPC = false;
           // We are dealing with an index into the .debug_addr section.
           LLVM_DEBUG({
-            dbgs() << format("indexed (%8.8x) address = ", (uint32_t)UValue);
+            dbgs() << formatv("indexed ({0:x-8}) address = ", (uint32_t)UValue);
           });
         }
       }
@@ -262,9 +263,8 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
           GetRanges(FormValue, U);
       if (!RangesOrError) {
         LLVM_DEBUG({
-          std::string TheError(toString(RangesOrError.takeError()));
-          dbgs() << format("error decoding address ranges = ",
-                           TheError.c_str());
+          dbgs() << formatv("error decoding address ranges = {0}",
+                            fmt_consume(RangesOrError.takeError()));
         });
         consumeError(RangesOrError.takeError());
         break;


        


More information about the llvm-commits mailing list