[llvm-commits] [llvm] r57574 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y
Nuno Lopes
nunoplopes at sapo.pt
Wed Oct 15 04:19:35 PDT 2008
Author: nlopes
Date: Wed Oct 15 06:19:34 2008
New Revision: 57574
URL: http://llvm.org/viewvc/llvm-project?rev=57574&view=rev
Log:
fix memleak in getTypeVal()
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=57574&r1=57573&r2=57574&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 06:19:34 2008
@@ -307,8 +307,10 @@
}
std::map<ValID, PATypeHolder>::iterator I =CurModule.LateResolveTypes.find(D);
- if (I != CurModule.LateResolveTypes.end())
+ if (I != CurModule.LateResolveTypes.end()) {
+ D.destroy();
return I->second;
+ }
Type *Typ = OpaqueType::get();
CurModule.LateResolveTypes.insert(std::make_pair(D, Typ));
More information about the llvm-commits
mailing list