diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index fccf37c7e4e5..8a16b9f2fd0a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -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,