[PATCH] D25826: [ELF] Show error location for 'undefined symbol' errors

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 12:56:22 PDT 2016


On 25 October 2016 at 14:08, Eugene Leviant <evgeny.leviant at gmail.com> wrote:
> evgeny777 added inline comments.
>
>
> ================
> Comment at: ELF/InputFiles.cpp:56
> +
> +template <class ELFT> DIHelper<ELFT>::~DIHelper() { delete DwarfLine; }
> +
> ----------------
> ruiu wrote:
>> Use unique_ptr to remove this dtor.
> It's not possible unless you include DWARFContext.h to InputFiles.h or override unique_ptr deleter (second template parameter). Is this better?

You can, as long as you declare a destructor in the .h file. In the
.cpp file you then have just

template <class ELFT> DIHelper<ELFT>::~DIHelper() { }

Cheers,
Rafael


More information about the llvm-commits mailing list