fix memleak in GetForwardRefForGlobal()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nuno Lopes 2008-10-15 12:04:36 +00:00
parent f05ff66a22
commit f2bd650fdf

View File

@ -140,6 +140,7 @@ static struct PerModuleInfo {
GlobalValue *Ret = 0;
if (I != GlobalRefs.end()) {
Ret = I->second;
I->first.second.destroy();
GlobalRefs.erase(I);
}
return Ret;