1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Fix memory leak in 4318028cd2d7633a0cdeb0b5d4d2ed81fab87864

This commit is contained in:
David Blaikie 2021-01-28 12:07:31 -08:00
parent 30175dd5d9
commit 85f9252ff2

View File

@ -100,9 +100,9 @@ void DwarfCompileUnit::addLabelAddress(DIE &Die, dwarf::Attribute Attribute,
addPoolOpAddress(*Loc, Label);
addBlock(Die, Attribute, dwarf::DW_FORM_exprloc, Loc);
} else
Die.addValue(
DIEValueAllocator, Attribute, dwarf::DW_FORM_LLVM_addrx_offset,
new DIEAddrOffset(DD->getAddressPool().getIndex(Base), Label, Base));
Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_LLVM_addrx_offset,
new (DIEValueAllocator) DIEAddrOffset(
DD->getAddressPool().getIndex(Base), Label, Base));
}
void DwarfCompileUnit::addLocalLabelAddress(DIE &Die,