[llvm] r262378 - Fix -Wnon-virtual-dtor warnings

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 11:39:54 PST 2016


Author: rnk
Date: Tue Mar  1 13:39:54 2016
New Revision: 262378

URL: http://llvm.org/viewvc/llvm-project?rev=262378&view=rev
Log:
Fix -Wnon-virtual-dtor warnings

Modified:
    llvm/trunk/include/llvm/ProfileData/ProfileCommon.h
    llvm/trunk/lib/ProfileData/ProfileSummary.cpp

Modified: llvm/trunk/include/llvm/ProfileData/ProfileCommon.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/ProfileCommon.h?rev=262378&r1=262377&r2=262378&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/ProfileCommon.h (original)
+++ llvm/trunk/include/llvm/ProfileData/ProfileCommon.h Tue Mar  1 13:39:54 2016
@@ -80,6 +80,7 @@ protected:
                  uint64_t TotalCount, uint64_t MaxCount, uint32_t NumCounts)
       : PSK(K), DetailedSummary(DetailedSummary), TotalCount(TotalCount),
         MaxCount(MaxCount), NumCounts(NumCounts) {}
+  virtual ~ProfileSummary();
   inline void addCount(uint64_t Count);
   /// \brief Return metadata specific to the profile format.
   /// Derived classes implement this method to return a vector of Metadata.
@@ -112,7 +113,7 @@ class InstrProfSummary : public ProfileS
   inline void addInternalCount(uint64_t Count);
 
 protected:
-  std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context);
+  std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context) override;
 
 public:
   InstrProfSummary(std::vector<uint32_t> Cutoffs)
@@ -144,7 +145,7 @@ class SampleProfileSummary : public Prof
   uint32_t NumFunctions;
 
 protected:
-  std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context);
+  std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context) override;
 
 public:
   uint32_t getNumLinesWithSamples() { return NumCounts; }

Modified: llvm/trunk/lib/ProfileData/ProfileSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/ProfileSummary.cpp?rev=262378&r1=262377&r2=262378&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/ProfileSummary.cpp (original)
+++ llvm/trunk/lib/ProfileData/ProfileSummary.cpp Tue Mar  1 13:39:54 2016
@@ -23,6 +23,8 @@
 
 using namespace llvm;
 
+ProfileSummary::~ProfileSummary() {}
+
 // A set of cutoff values. Each value, when divided by ProfileSummary::Scale
 // (which is 1000000) is a desired percentile of total counts.
 const std::vector<uint32_t> ProfileSummary::DefaultCutoffs(




More information about the llvm-commits mailing list