mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Fix a bug found by inspection.
llvm-svn: 112081
This commit is contained in:
parent
9bb1e88e8f
commit
bd785974b0
@ -2323,7 +2323,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
|
|||||||
if (A->getParent() == 0) {
|
if (A->getParent() == 0) {
|
||||||
// We found at least one unresolved value. Nuke them all to avoid leaks.
|
// We found at least one unresolved value. Nuke them all to avoid leaks.
|
||||||
for (unsigned i = ModuleValueListSize, e = ValueList.size(); i != e; ++i){
|
for (unsigned i = ModuleValueListSize, e = ValueList.size(); i != e; ++i){
|
||||||
if ((A = dyn_cast<Argument>(ValueList.back())) && A->getParent() == 0) {
|
if ((A = dyn_cast<Argument>(ValueList[i])) && A->getParent() == 0) {
|
||||||
A->replaceAllUsesWith(UndefValue::get(A->getType()));
|
A->replaceAllUsesWith(UndefValue::get(A->getType()));
|
||||||
delete A;
|
delete A;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user