[ORC-RT] Add IntervalMap and IntervalSet collections.
authorLang Hames <lhames@gmail.com>
Tue, 17 Jan 2023 01:22:28 +0000 (17:22 -0800)
committerLang Hames <lhames@gmail.com>
Tue, 17 Jan 2023 21:25:25 +0000 (13:25 -0800)
commitab59185fbfb15c9ce5a64e3aacd3a8c7f6a97621
treec6215c6bc1afc9345b3f262c6ecb8c64b4863c90
parentb53b964093ba779c09a629b2cb9f497314ba0437
[ORC-RT] Add IntervalMap and IntervalSet collections.

IntervalMap is an optionally-coalescing map -- it uses half-open ranges as keys,
allows lookups based on elements of the ranges (returning an iterator to the
containing range) and optionally coalesces adjacent ranges that have the same
value.

IntervalSet is an optionally-coalescing set based on IntervalMap.

These collections will be used to store and lookup metadata section ranges,
e.g. unwind-info ranges.
compiler-rt/lib/orc/interval_map.h [new file with mode: 0644]
compiler-rt/lib/orc/macho_platform.cpp
compiler-rt/lib/orc/tests/unit/CMakeLists.txt
compiler-rt/lib/orc/tests/unit/interval_map_test.cpp [new file with mode: 0644]