DWARFVerifier: make the verifier more comprehensive for objects
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 30 Oct 2018 23:45:27 +0000 (23:45 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 30 Oct 2018 23:45:27 +0000 (23:45 +0000)
Make the code do what was mentioned in the comment: only skip the CU types.
This enables the lexical blocks to be verified as well.

llvm-svn: 345675

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

index fdb7195..f3b242c 100644 (file)
@@ -414,7 +414,7 @@ unsigned DWARFVerifier::verifyDieRanges(const DWARFDie &Die,
   // For now, simply elide the range verification for the CU DIEs if we are
   // processing an object file.
 
-  if (!IsObjectFile || IsMachOObject || Die.getTag() == DW_TAG_subprogram) {
+  if (!IsObjectFile || IsMachOObject || Die.getTag() != DW_TAG_compile_unit) {
     for (auto Range : Ranges) {
       if (!Range.valid()) {
         ++NumErrors;