//===- ContinuousRangeMap.h - Map with int range as key ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the ContinuousRangeMap class, which is a highly // specialized container used by serialization. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SERIALIZATION_CONTINUOUSRANGEMAP_H #define LLVM_CLANG_SERIALIZATION_CONTINUOUSRANGEMAP_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include <algorithm> #include <cassert> #include <utility> namespace clang { /// A map from continuous integer ranges to some value, with a very /// specialized interface. /// /// CRM maps from integer ranges to values. The ranges are continuous, i.e. /// where one ends, the next one begins. So if the map contains the stops I0-3, /// the first range is from I0 to I1, the second from I1 to I2, the third from /// I2 to I3 and the last from I3 to infinity. /// /// Ranges must be inserted in order. Inserting a new stop I4 into the map will /// shrink the fourth range to I3 to I4 and add the new range I4 to inf. template <typename Int, typename V, unsigned InitialCapacity> class ContinuousRangeMap { … }; } // namespace clang #endif // LLVM_CLANG_SERIALIZATION_CONTINUOUSRANGEMAP_H