Index: include/llvm/DebugInfo/DWARF/DWARFAddressRange.h =================================================================== --- include/llvm/DebugInfo/DWARF/DWARFAddressRange.h +++ include/llvm/DebugInfo/DWARF/DWARFAddressRange.h @@ -39,14 +39,13 @@ // Empty ranges can't intersect. if (LowPC == HighPC || RHS.LowPC == RHS.HighPC) return false; - return (LowPC < RHS.HighPC) && (HighPC > RHS.LowPC); + return LowPC < RHS.HighPC && RHS.LowPC < HighPC; } /// Returns true if [LowPC, HighPC) fully contains [RHS.LowPC, RHS.HighPC). bool contains(const DWARFAddressRange &RHS) const { - if (LowPC <= RHS.LowPC && RHS.LowPC <= HighPC) - return LowPC <= RHS.HighPC && RHS.HighPC <= HighPC; - return false; + assert(valid() && RHS.valid()); + return LowPC <= RHS.LowPC && RHS.HighPC <= HighPC; } void dump(raw_ostream &OS, uint32_t AddressSize,