mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix a memory leak from DIE::addSiblingOffset() by adding the DIEValue
it allocates to DwarfDebug::DIEValues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -114,10 +114,11 @@ DIE::~DIE() {
|
||||
|
||||
/// addSiblingOffset - Add a sibling offset field to the front of the DIE.
|
||||
///
|
||||
void DIE::addSiblingOffset() {
|
||||
DIEValue *DIE::addSiblingOffset() {
|
||||
DIEInteger *DI = new DIEInteger(0);
|
||||
Values.insert(Values.begin(), DI);
|
||||
Abbrev.AddFirstAttribute(dwarf::DW_AT_sibling, dwarf::DW_FORM_ref4);
|
||||
return DI;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
Reference in New Issue
Block a user