Don't modify the DenseMap being iterated over from within the loop
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 27 Feb 2015 02:24:16 +0000 (02:24 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 27 Feb 2015 02:24:16 +0000 (02:24 +0000)
commit791a501266e71f6192f46149bca13ceb045fe02a
tree26f496ee9331a88179915c85e9800c8e08945765
parent26f67b5a279f47178b8ba4b507da3d75d8b124a5
Don't modify the DenseMap being iterated over from within the loop
that is iterating over it

Inserting elements into a `DenseMap` invalidated iterators pointing
into the `DenseMap` instance.

Differential Revision: http://reviews.llvm.org/D7924

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230719 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp