OpChain has subclasses, so add a virtual destructor.
authorJordan Rupprecht <rupprecht@google.com>
Mon, 23 Jul 2018 17:38:05 +0000 (17:38 +0000)
committerJordan Rupprecht <rupprecht@google.com>
Mon, 23 Jul 2018 17:38:05 +0000 (17:38 +0000)
Summary:
OpChain has subclasses, so add a virtual destructor.

This fixes an issue when deleting subclasses of OpChain (see MatchSMLAD() specifically) in r337701.

Reviewers: javed.absar

Subscribers: llvm-commits, SjoerdMeijer, samparker

Differential Revision: https://reviews.llvm.org/D49681

llvm-svn: 337713

llvm/lib/Target/ARM/ARMParallelDSP.cpp

index 24eb0bb..f3d8da6 100644 (file)
@@ -64,6 +64,7 @@ namespace {
     bool          ReadOnly = true;
 
     OpChain(Instruction *I, ValueList &vl) : Root(I), AllValues(vl) { }
+    virtual ~OpChain() = default;
 
     void SetMemoryLocations() {
       const auto Size = MemoryLocation::UnknownSize;