fix memleak in GetForwardRefForGlobal()

llvm-svn: 57576
This commit is contained in:
Nuno Lopes 2008-10-15 12:04:36 +00:00
parent 6f6e4e94be
commit 99f3dc6798
1 changed files with 1 additions and 0 deletions

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;