mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-18 03:07:52 +00:00
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
llvm-svn: 57008
This commit is contained in:
parent
263d218cd1
commit
5cb07eb550
@ -707,6 +707,7 @@ static void ResolveTypeTo(std::string *Name, const Type *ToTy) {
|
||||
((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 @@ ParseGlobalVariable(std::string *NameStr,
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user