[PATCH] D32821: Add DWARF verifiers to verify address ranges are correct and scoped correctly.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 15:50:10 PDT 2017


clayborg added a comment.

So now we have DIERangeInfo:

  struct DieRangeInfo {
    DWARFDie Die;
    DWARFAddressRangesVector Ranges;
  };

And a class to track ranges that can't overlap:

  struct NonOverlappingRanges {
    std::set<DieRangeInfo> NonOverlappingRanges;
  };

We store a DieRangeInfo for the compile unit name UnitRI and a NonOverlappingRanges instance named AllFunctionRanges in the Verify instance. Then we pass a "const DieRangeInfo &ParentRI" and a "NonOverlappingRanges &NRO" to verifyDIE. Since the parent range info and DIE can't change, they should be in 1 class (DieRangeInfo) and the non overlapping address ranges are in a modifiable in/out argument. This effectively implements what you asked for David. We also do checking on the fly in all cases.


https://reviews.llvm.org/D32821





More information about the llvm-commits mailing list