[llvm-commits] [llvm] r57008 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y
Nuno Lopes
nunoplopes at sapo.pt
Fri Oct 3 08:51:47 PDT 2008
Author: nlopes
Date: Fri Oct 3 10:51:46 2008
New Revision: 57008
URL: http://llvm.org/viewvc/llvm-project?rev=57008&view=rev
Log:
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
Modified:
llvm/trunk/lib/AsmParser/llvmAsmParser.y
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57008&r1=57007&r2=57008&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri Oct 3 10:51:46 2008
@@ -707,6 +707,7 @@
((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy);
CurModule.LateResolveTypes.erase(I);
}
+ D.destroy();
}
// setValueName - Set the specified value to the name given. The name may be
@@ -782,9 +783,12 @@
GV->setConstant(isConstantGlobal);
GV->setThreadLocal(IsThreadLocal);
InsertValue(GV, CurModule.Values);
+ ID.destroy();
return GV;
}
+ ID.destroy();
+
// If this global has a name
if (!Name.empty()) {
// if the global we're parsing has an initializer (is a definition) and
More information about the llvm-commits
mailing list