OSDN Git Service

[DebugInfo] Invert DIE order for range errors.
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 22 May 2018 17:38:03 +0000 (17:38 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 22 May 2018 17:38:03 +0000 (17:38 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333006 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFVerifier.cpp

index 356b141..67da9cc 100644 (file)
@@ -362,10 +362,9 @@ unsigned DWARFVerifier::verifyDieRanges(const DWARFDie &Die,
                              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";
   }