This patch is an attempt at making DenseMapIterators "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host DenseMap deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.
(This exact same thing can be done for SmallPtrSets, but that is a
later change.)
This change is fairly rough at the moment, but I want to get some
early feedback on the approach and style before I spend too much time
on this.
This change, in its current form, has already helped me fix two
existing bugs:
http://reviews.llvm.org/rL230718
http://reviews.llvm.org/rL230719