forked from OSchip/llvm-project
fix a serious regression I introduced in my previous patch.
llvm-svn: 68173
This commit is contained in:
parent
ff5961b46c
commit
647cffba61
llvm/lib/Bitcode/Reader
|
@ -2067,7 +2067,8 @@ Module *BitcodeReader::materializeModule(std::string *ErrInfo) {
|
||||||
if (CallInst* CI = dyn_cast<CallInst>(*UI++))
|
if (CallInst* CI = dyn_cast<CallInst>(*UI++))
|
||||||
UpgradeIntrinsicCall(CI, I->second);
|
UpgradeIntrinsicCall(CI, I->second);
|
||||||
}
|
}
|
||||||
I->first->replaceAllUsesWith(I->second);
|
if (!I->first->use_empty())
|
||||||
|
I->first->replaceAllUsesWith(I->second);
|
||||||
I->first->eraseFromParent();
|
I->first->eraseFromParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue