diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-03-01 20:41:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-03-01 20:41:17 +0000 |
commit | bcb1c7e369183b605d667053d5f00090718fdacf (patch) | |
tree | 3aebcf9acdd2395ffd9105be8020b8e7cc5d32a3 | |
parent | 578f2cdd2d349723f5047237e6cea39285a54bde (diff) | |
download | bcm5719-llvm-bcb1c7e369183b605d667053d5f00090718fdacf.tar.gz bcm5719-llvm-bcb1c7e369183b605d667053d5f00090718fdacf.zip |
Fix some warnings a bit harder/different
This is an alternate fix to 262378 and a fix to a pessimizing-move
warning.
llvm-svn: 262390
-rw-r--r-- | llvm/include/llvm/ProfileData/ProfileCommon.h | 6 | ||||
-rw-r--r-- | llvm/lib/LTO/LTOModule.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ProfileData/ProfileSummary.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/llvm/include/llvm/ProfileData/ProfileCommon.h b/llvm/include/llvm/ProfileData/ProfileCommon.h index fdf22564770..04f5cb27254 100644 --- a/llvm/include/llvm/ProfileData/ProfileCommon.h +++ b/llvm/include/llvm/ProfileData/ProfileCommon.h @@ -80,7 +80,7 @@ protected: uint64_t TotalCount, uint64_t MaxCount, uint32_t NumCounts) : PSK(K), DetailedSummary(DetailedSummary), TotalCount(TotalCount), MaxCount(MaxCount), NumCounts(NumCounts) {} - virtual ~ProfileSummary(); + ~ProfileSummary() = default; 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. @@ -106,7 +106,7 @@ public: static ProfileSummary *getFromMD(Metadata *MD); }; -class InstrProfSummary : public ProfileSummary { +class InstrProfSummary final : public ProfileSummary { uint64_t MaxInternalBlockCount, MaxFunctionCount; uint32_t NumFunctions; inline void addEntryCount(uint64_t Count); @@ -140,7 +140,7 @@ public: uint64_t getMaxInternalBlockCount() { return MaxInternalBlockCount; } }; -class SampleProfileSummary : public ProfileSummary { +class SampleProfileSummary final : public ProfileSummary { uint64_t MaxHeadSamples; uint32_t NumFunctions; diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index 9e49f0dc007..68a78a95f73 100644 --- a/llvm/lib/LTO/LTOModule.cpp +++ b/llvm/lib/LTO/LTOModule.cpp @@ -151,7 +151,7 @@ LTOModule::createInLocalContext(std::unique_ptr<LLVMContext> Context, makeLTOModule(Buffer, options, *Context, /* ShouldBeLazy */ true); if (Ret) (*Ret)->OwnedContext = std::move(Context); - return std::move(Ret); + return Ret; } static ErrorOr<std::unique_ptr<Module>> diff --git a/llvm/lib/ProfileData/ProfileSummary.cpp b/llvm/lib/ProfileData/ProfileSummary.cpp index 3384c54ed57..82546eb47d4 100644 --- a/llvm/lib/ProfileData/ProfileSummary.cpp +++ b/llvm/lib/ProfileData/ProfileSummary.cpp @@ -23,8 +23,6 @@ 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( |