mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Avoid a use after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abdd9e7330
commit
21afba1004
@ -4459,7 +4459,10 @@ std::error_code BitcodeReader::materialize(GlobalValue *GV) {
|
||||
// Upgrade any old intrinsic calls in the function.
|
||||
for (auto &I : UpgradedIntrinsics) {
|
||||
if (I.first != I.second) {
|
||||
for (auto *U : I.first->users()) {
|
||||
for (auto UI = I.first->user_begin(), UE = I.first->user_end();
|
||||
UI != UE;) {
|
||||
User *U = *UI;
|
||||
++UI;
|
||||
if (CallInst *CI = dyn_cast<CallInst>(U))
|
||||
UpgradeIntrinsicCall(CI, I.second);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user