mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-02 17:58:26 +00:00
Plug a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137321 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae0bc5deaa
commit
0fa5e053a9
@ -1046,18 +1046,18 @@ void DwarfDebug::endModule() {
|
||||
LexicalScope *Scope = new LexicalScope(NULL, DIDescriptor(SP), NULL,
|
||||
false);
|
||||
DeadFnScopeMap[SP] = Scope;
|
||||
SmallVector<DbgVariable *, 8> Variables;
|
||||
SmallVector<DbgVariable, 8> Variables;
|
||||
for (unsigned I = 0; I != E; ++I) {
|
||||
DIVariable DV(NMD->getOperand(I));
|
||||
if (!DV.Verify()) continue;
|
||||
Variables.push_back(new DbgVariable(DV));
|
||||
Variables.push_back(DbgVariable(DV));
|
||||
}
|
||||
|
||||
// Construct subprogram DIE and add variables DIEs.
|
||||
constructSubprogramDIE(SP);
|
||||
DIE *ScopeDIE = getCompileUnit(SP)->getDIE(SP);
|
||||
for (unsigned i = 0, N = Variables.size(); i < N; ++i) {
|
||||
if (DIE *VariableDIE = constructVariableDIE(Variables[i], Scope))
|
||||
if (DIE *VariableDIE = constructVariableDIE(&Variables[i], Scope))
|
||||
ScopeDIE->addChild(VariableDIE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user