[llvm] r174483 - Add virtual desctructor to FrameEntry to avoid error on delete-non-virtual-dtor

David Blaikie dblaikie at gmail.com
Tue Feb 5 19:57:44 PST 2013


On Feb 5, 2013 7:11 PM, "Eli Bendersky" <eliben at google.com> wrote:
>
> Author: eliben
> Date: Tue Feb  5 21:08:02 2013
> New Revision: 174483
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174483&view=rev
> Log:
> Add virtual desctructor to FrameEntry to avoid error on
delete-non-virtual-dtor
>
> Modified:
>     llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp
>
> Modified: llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp?rev=174483&r1=174482&r2=174483&view=diff
>
==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp Tue Feb  5 21:08:02 2013
> @@ -23,6 +23,9 @@ public:
>    FrameEntry(FrameKind K, DataExtractor D, uint64_t Offset, uint64_t
Length)
>      : Kind(K), Data(D), Offset(Offset), Length(Length) {}
>
> +  virtual ~FrameEntry() {
> +  }
> +
>    FrameKind getKind() const { return Kind; }
>
>    virtual void dumpHeader(raw_ostream &OS) const = 0;
> @@ -54,6 +57,9 @@ public:
>       DataAlignmentFactor(DataAlignmentFactor),
>       ReturnAddressRegister(ReturnAddressRegister) {}
>
> +  ~CIE() {
> +  }

Why did you add these explicit destructors that are the same as the
implicit ones?

> +
>    void dumpHeader(raw_ostream &OS) const {
>      OS << format("%08x %08x %08x CIE", Offset, Length, DW_CIE_ID) <<
"\n";
>      OS << format("  Version:               %d\n", Version);
> @@ -89,6 +95,9 @@ public:
>       InitialLocation(InitialLocation), AddressRange(AddressRange),
>       LinkedCIE(NULL) {}
>
> +  ~FDE() {
> +  }
> +
>    void dumpHeader(raw_ostream &OS) const {
>      OS << format("%08x %08x %08x FDE ", Offset, Length, LinkedCIEOffset);
>      OS << format("cie=%08x pc=%08x...%08x\n",
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130205/db8e948e/attachment.html>


More information about the llvm-commits mailing list