[PATCH] D44772: [DWARF] Simplify DWARFAddressRange::{intersects, contains}.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 05:15:19 PDT 2018


JDevlieghere added a comment.

In https://reviews.llvm.org/D44772#1045471, @jhenderson wrote:

> In https://reviews.llvm.org/D44772#1045463, @JDevlieghere wrote:
>
> > That said, I'm not convinced we should consider fully-enclosed empty intervals as intersecting; the DWARF standard says that empty ranges can be ignored and therefore the verifier should not complain about this.
>
>
> Okay, I'm convinced by that comment (I just checked, and it applies for .debug_ranges as well as .debug_rnglists). In more general terms, empty ranges probably should be considered for intersection, in my opinion, but not for these sort of ranges.


In mathematics, the intersection of two intervals is always an interval. The intersection of the any empty interval with any other interval would be the empty interval. The intersection of two disjoin intervals would also be the empty interval. So I don't think the empty interval should ever be considered as intersecting with anything.


Repository:
  rL LLVM

https://reviews.llvm.org/D44772





More information about the llvm-commits mailing list