[llvm] Aggregate errors from llvm-dwarfutil --verify (PR #79648)

Kevin Frei via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 08:05:48 PST 2024


================
@@ -240,30 +285,38 @@ unsigned DWARFVerifier::verifyUnitContents(DWARFUnit &Unit,
 
   DWARFDie Die = Unit.getUnitDIE(/* ExtractUnitDIEOnly = */ false);
   if (!Die) {
-    error() << "Compilation unit without DIE.\n";
+    ErrorCategory.Report("Compilation unit missing DIE", [&]() {
+      error() << "Compilation unit without DIE.\n";
+    });
     NumUnitErrors++;
     return NumUnitErrors;
   }
 
   if (!dwarf::isUnitType(Die.getTag())) {
-    error() << "Compilation unit root DIE is not a unit DIE: "
-            << dwarf::TagString(Die.getTag()) << ".\n";
+    ErrorCategory.Report("Compilation unit root DIE is not a unit DIE", [&]() {
+      error() << "Compilation unit root DIE is not a unit DIE: "
+              << dwarf::TagString(Die.getTag()) << ".\n";
----------------
kevinfrei wrote:

I want to keep detailed message changes separate from the summary details. I'll improve details in a subsequent change.

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


More information about the llvm-commits mailing list