[llvm] [llvm][DebugInfo] formatv in LVReader (PR #192007)

Konrad Kleine via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 08:51:53 PDT 2026


================
@@ -70,22 +70,19 @@ bool checkIntegrityScopesTree(LVScope *Root) {
     });
 
     auto PrintIndex = [](unsigned Index) {
-      if (Index)
-        dbgs() << format("%8d: ", Index);
-      else
-        dbgs() << format("%8c: ", ' ');
+      dbgs() << formatv("{0,8}: ", Index ? Index : ' ');
----------------
kwk wrote:

Nevermind. This fails:

```c++
unsigned Index = 0;
EXPECT_EQ("        ", formatv("{0,8}", Index ? Index : ' ').str());
```

because it produces `      32`. 

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


More information about the llvm-commits mailing list