[ORC] Avoid invalidating iterators in EHFrameRegistrationPlugin.
authorLang Hames <lhames@gmail.com>
Sun, 25 Apr 2021 23:47:56 +0000 (16:47 -0700)
committerLang Hames <lhames@gmail.com>
Sun, 25 Apr 2021 23:55:19 +0000 (16:55 -0700)
commitc1baf946e6cf611ae871e34db5cfea0f94f4b5a0
tree35a7c682b833679758eaedecceb4805e2f2aa23a
parentc624e701491c320cf5c662006082a8e956c30e8d
[ORC] Avoid invalidating iterators in EHFrameRegistrationPlugin.

In EHFrameRegistrationPlugin::notifyTransferringResources if SrcKey had
eh-frames associated but DstKey did not we would create a new entry for DskKey,
invalidating the iterator for SrcKey in the process. This commit fixes that by
removing SrcKey first in this case.
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp