[all-commits] [llvm/llvm-project] 2cf3c0: [DenseMap] Don't capture the BucketEnd pointer bef...

topperc via All-commits all-commits at lists.llvm.org
Tue Apr 21 00:39:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf3c033f3a1d4c2c36a94a80b7ba6bcba1e8711
      https://github.com/llvm/llvm-project/commit/2cf3c033f3a1d4c2c36a94a80b7ba6bcba1e8711
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-04-21 (Tue, 21 Apr 2020)

  Changed paths:
    M llvm/include/llvm/ADT/DenseMap.h

  Log Message:
  -----------
  [DenseMap] Don't capture the BucketEnd pointer before an operation that might change the number of buckets.

This code was added in 887efa51c1e0e43ca684ed78b92dbc3a0720881b to
fix reverse iteration.

The call to InsertIntoBucket/InsertIntoBucketWithLookup can change
the number of buckets which will invalidate the BucketEnd. So
don't cache it and calculate it when creating the iterator.




More information about the All-commits mailing list