mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-26 07:18:15 +00:00
[ADT] Increment epoch from DenseMap::swap.
Swapping DenseMap A with DenseMap B invalidates iterators pointing into both A and B. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -584,6 +584,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void swap(DenseMap& RHS) {
|
void swap(DenseMap& RHS) {
|
||||||
|
this->incrementEpoch();
|
||||||
|
RHS.incrementEpoch();
|
||||||
std::swap(Buckets, RHS.Buckets);
|
std::swap(Buckets, RHS.Buckets);
|
||||||
std::swap(NumEntries, RHS.NumEntries);
|
std::swap(NumEntries, RHS.NumEntries);
|
||||||
std::swap(NumTombstones, RHS.NumTombstones);
|
std::swap(NumTombstones, RHS.NumTombstones);
|
||||||
|
|||||||
Reference in New Issue
Block a user