1 //===-- sanitizer_range.h ---------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Contais Range and related utilities.
11 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_RANGE_H
14 #define SANITIZER_RANGE_H
16 #include "sanitizer_common.h"
17 #include "sanitizer_common/sanitizer_array_ref.h"
19 namespace __sanitizer
{
26 inline bool operator==(const Range
&lhs
, const Range
&rhs
) {
27 return lhs
.begin
== rhs
.begin
&& lhs
.end
== rhs
.end
;
30 inline bool operator!=(const Range
&lhs
, const Range
&rhs
) {
34 // Calculates intersection of two sets of regions in O(N log N) time.
35 void Intersect(ArrayRef
<Range
> a
, ArrayRef
<Range
> b
,
36 InternalMmapVectorNoCtor
<Range
> &output
);
38 } // namespace __sanitizer
40 #endif // SANITIZER_RANGE_H