summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ProfileData/ProfileCommon.h5
-rw-r--r--llvm/lib/ProfileData/ProfileSummary.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/include/llvm/ProfileData/ProfileCommon.h b/llvm/include/llvm/ProfileData/ProfileCommon.h
index 92b33b0e7d9..fdf22564770 100644
--- a/llvm/include/llvm/ProfileData/ProfileCommon.h
+++ b/llvm/include/llvm/ProfileData/ProfileCommon.h
@@ -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; }
diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp
index 82546eb47d4..3384c54ed57 100644
--- a/llvm/lib/ProfileData/ProfileSummary.cpp
+++ b/llvm/lib/ProfileData/ProfileSummary.cpp
@@ -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(
OpenPOWER on IntegriCloud