[llvm] [DebugInfo] Convert format() to formatv() in DWARFVerifier (PR #179194)

Konrad Kleine via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 03:33:44 PST 2026


================
@@ -811,12 +814,11 @@ unsigned DWARFVerifier::verifyDebugInfoAttribute(const DWARFDie &Die,
           if (std::optional<uint64_t> LastFileIdx =
                   LT->getLastValidFileIndex()) {
             ReportError("Invalid file index in DW_AT_decl_file",
-                        "DIE has " + AttributeString(Attr) +
-                            " with an invalid file index " +
-                            llvm::formatv("{0}", *FileIdx) +
-                            " (valid values are [" +
-                            (IsZeroIndexed ? "0-" : "1-") +
-                            llvm::formatv("{0}", *LastFileIdx) + "])");
+                        llvm::formatv("DIE has {0} with an invalid file index "
----------------
kwk wrote:

@DavidSpickett @JDevlieghere I wonder if it is okay to put most of the text in the `formatv()` call to

1. make it easier to read. 
2. have less formatv calls.

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


More information about the llvm-commits mailing list