Skip to content

Commit

Permalink
Add virtual desctructor to FrameEntry to avoid error on delete-non-vi…
Browse files Browse the repository at this point in the history
…rtual-dtor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174483 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
eliben committed Feb 6, 2013
1 parent 607acd6 commit 8a0329e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/DebugInfo/DWARFDebugFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class llvm::FrameEntry {
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;
Expand Down Expand Up @@ -54,6 +57,9 @@ class CIE : public FrameEntry {
DataAlignmentFactor(DataAlignmentFactor),
ReturnAddressRegister(ReturnAddressRegister) {}

~CIE() {
}

void dumpHeader(raw_ostream &OS) const {
OS << format("%08x %08x %08x CIE", Offset, Length, DW_CIE_ID) << "\n";
OS << format(" Version: %d\n", Version);
Expand Down Expand Up @@ -89,6 +95,9 @@ class FDE : public FrameEntry {
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",
Expand Down

0 comments on commit 8a0329e

Please sign in to comment.