Use default destructor and remove unnecessary virtual destructor
authorTeresa Johnson <tejohnson@google.com>
Sat, 12 Mar 2016 05:38:22 +0000 (05:38 +0000)
committerTeresa Johnson <tejohnson@google.com>
Sat, 12 Mar 2016 05:38:22 +0000 (05:38 +0000)
Only the virtual destructor in the base class is needed, and can use the
default.

llvm-svn: 263335

llvm/include/llvm/IR/FunctionInfo.h

index 81364b5..891c9c7 100644 (file)
@@ -88,7 +88,7 @@ protected:
       : Kind(K), Linkage(Linkage) {}
 
 public:
-  virtual ~GlobalValueSummary() {}
+  virtual ~GlobalValueSummary() = default;
 
   /// Which kind of summary subclass this is.
   SummaryKind getSummaryKind() const { return Kind; }
@@ -138,7 +138,6 @@ public:
   /// Summary constructors.
   FunctionSummary(GlobalValue::LinkageTypes Linkage, unsigned NumInsts)
       : GlobalValueSummary(FunctionKind, Linkage), InstCount(NumInsts) {}
-  virtual ~FunctionSummary() {}
 
   /// Check if this is a function summary.
   static bool classof(const GlobalValueSummary *GVS) {