[llvm] cd93ab8 - DWARFVerifier: Don't parse all units twice

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 14:05:39 PST 2021


Author: David Blaikie
Date: 2021-11-24T14:03:56-08:00
New Revision: cd93ab8947a88470b3e1ef738a2947c0bfda667f

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

LOG: DWARFVerifier: Don't parse all units twice

Introduced/discussed in https://reviews.llvm.org/D38719

The header validation logic was also explicitly building the DWARFUnits
to validate. But then other calls, like "Units.getUnitForOffset" creates
the DWARFUnits again in the DWARFContext proper - so, let's avoid
creating the DWARFUnits twice by walking the DWARFContext's units rather
than building a new list explicitly.

This does reduce some verifier power - it means that any unit with a
header parsing failure won't get further validation, whereas the
verifier-created units were getting some further validation despite
invalid headers. I don't think this is a great loss/seems "right" in
some ways to me that if the header's invalid we should stop there.

Exposing the raw DWARFUnitVectors from DWARFContext feels a bit
sub-optimal, but gave simple access to the getUnitForOffset to keep the
rest of the code fairly similar.

Added: 
    

Modified: 
    llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
    llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    llvm/test/DebugInfo/X86/skeleton-unit-verify.s
    llvm/test/tools/llvm-dwarfdump/X86/verify_curanges_incomplete.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
    llvm/test/tools/llvm-dwarfdump/X86/verify_die_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_cu_ref.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_die_range.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr_between.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_rnglists.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_stmt_list.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_strp.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_lexical_block_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_lexical_block_ranges.yaml
    llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
index 902973ff57228..ae1afeb668be4 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
@@ -156,6 +156,11 @@ class DWARFContext : public DIContext {
                                    NormalUnits.getNumInfoUnits());
   }
 
+  const DWARFUnitVector &getNormalUnitsVector() {
+    parseNormalUnits();
+    return NormalUnits;
+  }
+
   /// Get units from .debug_types in this context.
   unit_iterator_range types_section_units() {
     parseNormalUnits();

diff  --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
index d471b80c7fe1f..505686bfbf596 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
@@ -14,6 +14,7 @@
 #include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"
 #include "llvm/DebugInfo/DWARF/DWARFDie.h"
 #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
+#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
 #include <cstdint>
 #include <map>
 #include <set>
@@ -153,8 +154,8 @@ class DWARFVerifier {
   /// \param SectionKind The object-file section kind that S comes from.
   ///
   /// \returns The number of errors that occurred during verification.
-  unsigned verifyUnitSection(const DWARFSection &S,
-                             DWARFSectionKind SectionKind);
+  unsigned verifyUnitSection(const DWARFSection &S);
+  unsigned verifyUnits(const DWARFUnitVector &Units);
 
   /// Verifies that a call site entry is nested within a subprogram with a
   /// DW_AT_call attribute.

diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
index fb0798f204e1e..7673a721c4eab 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
@@ -15,6 +15,7 @@
 #include "llvm/DebugInfo/DWARF/DWARFExpression.h"
 #include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
 #include "llvm/DebugInfo/DWARF/DWARFSection.h"
+#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
 #include "llvm/Support/DJB.h"
 #include "llvm/Support/FormatVariadic.h"
 #include "llvm/Support/WithColor.h"
@@ -317,12 +318,33 @@ bool DWARFVerifier::handleDebugAbbrev() {
   return NumErrors == 0;
 }
 
-unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S,
-                                          DWARFSectionKind SectionKind) {
+unsigned DWARFVerifier::verifyUnits(const DWARFUnitVector &Units) {
+  unsigned NumDebugInfoErrors = 0;
+  ReferenceMap CrossUnitReferences;
+
+  for (const auto &Unit : Units) {
+      ReferenceMap UnitLocalReferences;
+      NumDebugInfoErrors +=
+          verifyUnitContents(*Unit, UnitLocalReferences, CrossUnitReferences);
+      NumDebugInfoErrors += verifyDebugInfoReferences(
+          UnitLocalReferences, [&](uint64_t Offset) { return Unit.get(); });
+  }
+
+  NumDebugInfoErrors += verifyDebugInfoReferences(
+      CrossUnitReferences, [&](uint64_t Offset) -> DWARFUnit * {
+        if (DWARFUnit *U = Units.getUnitForOffset(Offset))
+          return U;
+        return nullptr;
+      });
+
+  return NumDebugInfoErrors;
+}
+
+unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S) {
   const DWARFObject &DObj = DCtx.getDWARFObj();
   DWARFDataExtractor DebugInfoData(DObj, S, DCtx.isLittleEndian(), 0);
   unsigned NumDebugInfoErrors = 0;
-  uint64_t OffsetStart = 0, Offset = 0, UnitIdx = 0;
+  uint64_t Offset = 0, UnitIdx = 0;
   uint8_t UnitType = 0;
   bool isUnitDWARF64 = false;
   bool isHeaderChainValid = true;
@@ -334,48 +356,11 @@ unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S,
   /// lies between to valid DIEs.
   ReferenceMap CrossUnitReferences;
   while (hasDIE) {
-    OffsetStart = Offset;
     if (!verifyUnitHeader(DebugInfoData, &Offset, UnitIdx, UnitType,
                           isUnitDWARF64)) {
       isHeaderChainValid = false;
       if (isUnitDWARF64)
         break;
-    } else {
-      DWARFUnitHeader Header;
-      Header.extract(DCtx, DebugInfoData, &OffsetStart, SectionKind);
-      ReferenceMap UnitLocalReferences;
-      DWARFUnit *Unit;
-      switch (UnitType) {
-      case dwarf::DW_UT_type:
-      case dwarf::DW_UT_split_type: {
-        Unit = TypeUnitVector.addUnit(std::make_unique<DWARFTypeUnit>(
-            DCtx, S, Header, DCtx.getDebugAbbrev(), &DObj.getRangesSection(),
-            &DObj.getLocSection(), DObj.getStrSection(),
-            DObj.getStrOffsetsSection(), &DObj.getAddrSection(),
-            DObj.getLineSection(), DCtx.isLittleEndian(), false,
-            TypeUnitVector));
-        break;
-      }
-      case dwarf::DW_UT_skeleton:
-      case dwarf::DW_UT_split_compile:
-      case dwarf::DW_UT_compile:
-      case dwarf::DW_UT_partial:
-      // UnitType = 0 means that we are verifying a compile unit in DWARF v4.
-      case 0: {
-        Unit = CompileUnitVector.addUnit(std::make_unique<DWARFCompileUnit>(
-            DCtx, S, Header, DCtx.getDebugAbbrev(), &DObj.getRangesSection(),
-            &DObj.getLocSection(), DObj.getStrSection(),
-            DObj.getStrOffsetsSection(), &DObj.getAddrSection(),
-            DObj.getLineSection(), DCtx.isLittleEndian(), false,
-            CompileUnitVector));
-        break;
-      }
-      default: { llvm_unreachable("Invalid UnitType."); }
-      }
-      NumDebugInfoErrors +=
-          verifyUnitContents(*Unit, UnitLocalReferences, CrossUnitReferences);
-      NumDebugInfoErrors += verifyDebugInfoReferences(
-          UnitLocalReferences, [&](uint64_t Offset) { return Unit; });
     }
     hasDIE = DebugInfoData.isValidOffset(Offset);
     ++UnitIdx;
@@ -386,14 +371,6 @@ unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S,
   }
   if (!isHeaderChainValid)
     ++NumDebugInfoErrors;
-  NumDebugInfoErrors += verifyDebugInfoReferences(
-      CrossUnitReferences, [&](uint64_t Offset) -> DWARFUnit * {
-        if (DWARFUnit *U = TypeUnitVector.getUnitForOffset(Offset))
-          return U;
-        if (DWARFUnit *U = CompileUnitVector.getUnitForOffset(Offset))
-          return U;
-        return nullptr;
-      });
   return NumDebugInfoErrors;
 }
 
@@ -403,13 +380,16 @@ bool DWARFVerifier::handleDebugInfo() {
 
   OS << "Verifying .debug_info Unit Header Chain...\n";
   DObj.forEachInfoSections([&](const DWARFSection &S) {
-    NumErrors += verifyUnitSection(S, DW_SECT_INFO);
+    NumErrors += verifyUnitSection(S);
   });
 
   OS << "Verifying .debug_types Unit Header Chain...\n";
   DObj.forEachTypesSections([&](const DWARFSection &S) {
-    NumErrors += verifyUnitSection(S, DW_SECT_EXT_TYPES);
+    NumErrors += verifyUnitSection(S);
   });
+
+  OS << "Verifying non-dwo Units...\n";
+  NumErrors += verifyUnits(DCtx.getNormalUnitsVector());
   return NumErrors == 0;
 }
 

diff  --git a/llvm/test/DebugInfo/X86/skeleton-unit-verify.s b/llvm/test/DebugInfo/X86/skeleton-unit-verify.s
index a5911e93f4bc4..6441aa31d808f 100644
--- a/llvm/test/DebugInfo/X86/skeleton-unit-verify.s
+++ b/llvm/test/DebugInfo/X86/skeleton-unit-verify.s
@@ -3,10 +3,11 @@
 
 # CHECK: Verifying .debug_abbrev...
 # CHECK-NEXT: Verifying .debug_info Unit Header Chain...
+# CHECK-NEXT: Verifying .debug_types Unit Header Chain...
+# CHECK-NEXT: Verifying non-dwo Units...
 # CHECK-NEXT: warning: DW_TAG_skeleton_unit has DW_CHILDREN_yes but DIE has no children
 # CHECK-NEXT: DW_TAG_skeleton_unit
 # CHECK-NEXT: error: Skeleton compilation unit has children.
-# CHECK-NEXT: Verifying .debug_types Unit Header Chain...
 # CHECK-NEXT: Errors detected.
 
         .section .debug_abbrev,"", at progbits

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_curanges_incomplete.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_curanges_incomplete.yaml
index 39fadca9f5ba9..5200311ad4538 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_curanges_incomplete.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_curanges_incomplete.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DIE address ranges are not contained in its parent's ranges:
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
index b3e5c77091ca3..c2502adf1a8d8 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
@@ -2,6 +2,12 @@
 # RUN: | not llvm-dwarfdump -v -verify - \
 # RUN: | FileCheck %s
 
+# CHECK: Verifying .debug_info Unit Header Chain...
+# CHECK-NEXT: error: Units[2] - start offset: 0x00000068
+# CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
+# CHECK-NEXT: note: The unit type encoding is not valid.
+
+# CHECK: Verifying non-dwo Units...
 # CHECK: error: DIE has invalid DW_AT_stmt_list encoding:{{[[:space:]]}}
 # CHECK-NEXT: 0x0000000c: DW_TAG_compile_unit [1] *
 # CHECK-NEXT: DW_AT_producer [DW_FORM_strp]	( .debug_str[0x00000000] = "clang version 5.0.0 (trunk 308185) (llvm/trunk 308186)")
@@ -42,9 +48,6 @@
 # CHECK-NEXT: DW_AT_use_location [DW_FORM_ref4]	(cu + 0x0053 => {0x00000053}){{[[:space:]]}}
 # CHECK-NEXT: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
 # CHECK-NEXT: error: Compilation unit type (DW_UT_compile) and root DIE (DW_TAG_null) do not match.
-# CHECK-NEXT: error: Units[2] - start offset: 0x00000068
-# CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
-# CHECK-NEXT: note: The unit type encoding is not valid.
 
 
 	.section	__TEXT,__text,regular,pure_instructions

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_die_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_die_ranges.yaml
index 871b7680f6472..8580ca4b23dc8 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_die_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_die_ranges.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: Invalid address range [0x0000000000000007, 0x0000000000000006)
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_cu_ref.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_cu_ref.yaml
index d3a5ff7c5dcf5..2951d8c708c29 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_cu_ref.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_cu_ref.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DW_FORM_ref4 CU offset 0x00001234 is invalid (must be less than CU size of 0x0000001a):
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_die_range.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_die_range.yaml
index 31ff1231eab8d..e7870474fe3fa 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_die_range.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_die_range.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: Invalid address range
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ranges.yaml
index 53317d7fc3c64..b3e4a89da9602 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ranges.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DW_AT_ranges offset is beyond .debug_ranges bounds: 0x00001000
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr.yaml
index b998e1a754dcd..f9b4cf4f8e92b 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DW_FORM_ref_addr offset beyond .debug_info bounds:
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr_between.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr_between.yaml
index a412f7b879b8e..76a11f987028f 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr_between.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_ref_addr_between.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: invalid DIE reference 0x00000011. Offset is in between DIEs:
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_rnglists.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_rnglists.yaml
index 6328f1f22ec71..009a037f5f844 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_rnglists.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_rnglists.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DW_AT_ranges offset is beyond .debug_rnglists bounds: 0x00001000
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_stmt_list.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_stmt_list.yaml
index 22db1c1ed1a32..31e92d2cac915 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_stmt_list.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_stmt_list.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DW_AT_stmt_list offset is beyond .debug_line bounds: 0x00001000
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_strp.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_strp.yaml
index 128c8ba4c4934..e630999cd5946 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_strp.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_strp.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain... 
+#      CHECK: Verifying non-dwo Units... 
 # CHECK-NEXT: error: DW_FORM_strp offset beyond .debug_str bounds:
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_lexical_block_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_lexical_block_ranges.yaml
index b2e3667b106b7..f8e8775a42084 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_lexical_block_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_lexical_block_ranges.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DIE address ranges are not contained in its parent's ranges:
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
index 9533c2795783d..200c328b41033 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
@@ -64,8 +64,6 @@
 # CHECK-NEXT:              DW_AT_low_pc      (0x0000000000000000)
 # CHECK-NEXT:              DW_AT_high_pc     (0x0000000000000020)
 
-# CHECK: Verifying
-
 --- !mach-o
 FileHeader:
   magic:           0xFEEDFACF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges.yaml
index 430e77e4fa8a1..8db28adf45404 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DIEs have overlapping address ranges
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_lexical_block_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_lexical_block_ranges.yaml
index 0644f65d4eef3..c8f98504df064 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_lexical_block_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_lexical_block_ranges.yaml
@@ -1,7 +1,7 @@
 # RUN: yaml2obj %s -o %t.o
 # RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
 
-#      CHECK: Verifying .debug_info Unit Header Chain...
+#      CHECK: Verifying non-dwo Units...
 # CHECK-NEXT: error: DIEs have overlapping address ranges
 
 --- !ELF

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
index 046e7b7b6a2d7..baee5d86a24ed 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_unit_header_chain.s
@@ -9,8 +9,6 @@
 # CHECK-NEXT: error: Units[2] - start offset: 0x00000026
 # CHECK-NEXT: note: The 16 bit unit header version is not valid.
 # CHECK-NEXT: note: The offset into the .debug_abbrev section is not valid.
-# CHECK-NEXT: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
-# CHECK-NEXT: error: Compilation unit type (DW_UT_compile) and root DIE (DW_TAG_null) do not match.
 # CHECK-NEXT: error: Units[4] - start offset: 0x00000041
 # CHECK-NEXT: note: The length for this unit is too large for the .debug_info provided.
 


        


More information about the llvm-commits mailing list