[llvm] r333006 - [DebugInfo] Invert DIE order for range errors.

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 10:38:03 PDT 2018


Author: jdevlieghere
Date: Tue May 22 10:38:03 2018
New Revision: 333006

URL: http://llvm.org/viewvc/llvm-project?rev=333006&view=rev
Log:
[DebugInfo] Invert DIE order for range errors.

When printing an error for an invalid address range in a DIE, we used to
print the child above the parent, which is counter intuitive. This patch
reverses the order and indents the child to mimic the way we print the
debug info section.

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp?rev=333006&r1=333005&r2=333006&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp Tue May 22 10:38:03 2018
@@ -362,10 +362,9 @@ unsigned DWARFVerifier::verifyDieRanges(
                              ParentRI.Die.getTag() == DW_TAG_subprogram);
   if (ShouldBeContained && !ParentRI.contains(RI)) {
     ++NumErrors;
-    error() << "DIE address ranges are not "
-               "contained in its parent's ranges:";
-    Die.dump(OS, 0);
+    error() << "DIE address ranges are not contained in its parent's ranges:";
     ParentRI.Die.dump(OS, 0);
+    Die.dump(OS, 2);
     OS << "\n";
   }
 




More information about the llvm-commits mailing list