mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it
llvm-svn: 80790
This commit is contained in:
parent
34150f5680
commit
f00826065d
@ -1701,6 +1701,7 @@ bool LLParser::PerFunctionState::SetInstName(int NameID,
|
||||
return P.Error(NameLoc, "instruction forward referenced with type '" +
|
||||
FI->second.first->getType()->getDescription() + "'");
|
||||
FI->second.first->replaceAllUsesWith(Inst);
|
||||
delete FI->second.first;
|
||||
ForwardRefVals.erase(FI);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user