Fix -Wnon-virtual-dtor warnings

llvm-svn: 262378
This commit is contained in:
Reid Kleckner 2016-03-01 19:39:54 +00:00
parent 262b927d36
commit d2da0f0cac
2 changed files with 5 additions and 2 deletions

View File

@ -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 ProfileSummary {
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 ProfileSummary {
uint32_t NumFunctions;
protected:
std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context);
std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context) override;
public:
uint32_t getNumLinesWithSamples() { return NumCounts; }

View File

@ -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(