[PATCH] RFC: fail-fast iterators for DenseMap

Sanjoy Das sanjoy at playingwithpointers.com
Mon Mar 2 17:53:54 PST 2015


I'm about to revert this because it broke clang.

The reason it broke clang is that clang assumes a default constructed
DenseMapIterator is comparable with another default constructed
DenseMapIterator.  In general, comparison of iterators is not
invariant across insertions into DenseMap (for instance, dmap.end()
will be different after we've resized the hash-table), but I'm not
sure if such a restriction makes sense for default constructed
DenseMapIterators.  We could say that such default-constructed
iterators compare equal to only other default constructed iterators
and no other iterators, for instance.

What do you think?

On Mon, Mar 2, 2015 at 3:32 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D7931
>
> Files:
>   llvm/trunk/include/llvm/ADT/DenseMap.h
>   llvm/trunk/include/llvm/ADT/EpochTracker.h
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/



More information about the llvm-commits mailing list