diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
commit | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch) | |
tree | 27425930fc0c91650a7f3527fcac8e0f92907b90 /include/clang/Serialization/ContinuousRangeMap.h | |
parent | 486754660bb926339aefcf012a3f848592babb8b (diff) |
Diffstat (limited to 'include/clang/Serialization/ContinuousRangeMap.h')
-rw-r--r-- | include/clang/Serialization/ContinuousRangeMap.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Serialization/ContinuousRangeMap.h b/include/clang/Serialization/ContinuousRangeMap.h index 2f909965db7ef..73bf2ed10f044 100644 --- a/include/clang/Serialization/ContinuousRangeMap.h +++ b/include/clang/Serialization/ContinuousRangeMap.h @@ -72,14 +72,14 @@ public: "Must insert keys in order."); Rep.push_back(Val); } - + void insertOrReplace(const value_type &Val) { iterator I = std::lower_bound(Rep.begin(), Rep.end(), Val, Compare()); if (I != Rep.end() && I->first == Val.first) { I->second = Val.second; return; } - + Rep.insert(I, Val); } @@ -106,7 +106,7 @@ public: reference back() { return Rep.back(); } const_reference back() const { return Rep.back(); } - + /// An object that helps properly build a continuous range map /// from a set of values. class Builder { @@ -116,7 +116,7 @@ public: explicit Builder(ContinuousRangeMap &Self) : Self(Self) {} Builder(const Builder&) = delete; Builder &operator=(const Builder&) = delete; - + ~Builder() { llvm::sort(Self.Rep.begin(), Self.Rep.end(), Compare()); std::unique(Self.Rep.begin(), Self.Rep.end(), @@ -128,7 +128,7 @@ public: return A == B; }); } - + void insert(const value_type &Val) { Self.Rep.push_back(Val); } |