mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
fix a serious regression I introduced in my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f41fcbb60d
commit
7d9eb5884c
@ -2067,7 +2067,8 @@ Module *BitcodeReader::materializeModule(std::string *ErrInfo) {
|
||||
if (CallInst* CI = dyn_cast<CallInst>(*UI++))
|
||||
UpgradeIntrinsicCall(CI, I->second);
|
||||
}
|
||||
I->first->replaceAllUsesWith(I->second);
|
||||
if (!I->first->use_empty())
|
||||
I->first->replaceAllUsesWith(I->second);
|
||||
I->first->eraseFromParent();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user