Skip to content

Commit

Permalink
[ifs] IFSStub destructor should be virtual
Browse files Browse the repository at this point in the history
This patch makes IFSStub class's destructor virtual to avoid
undefined behavior when it points to its child class's object and
got deleted.

Differential Revision: https://reviews.llvm.org/D154776
  • Loading branch information
Amirreza Ashouri authored and zeroomega committed Jul 10, 2023
1 parent a6ea018 commit 0fd4175
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/include/llvm/InterfaceStub/IFSStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ struct IFSStub {
IFSStub() = default;
IFSStub(const IFSStub &Stub);
IFSStub(IFSStub &&Stub);
virtual ~IFSStub() = default;
};

// Create a alias class for IFSStub.
Expand Down

0 comments on commit 0fd4175

Please sign in to comment.