[llvm] r262390 - Fix some warnings a bit harder/different
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 12:41:17 PST 2016
Author: dblaikie
Date: Tue Mar 1 14:41:17 2016
New Revision: 262390
URL: http://llvm.org/viewvc/llvm-project?rev=262390&view=rev
Log:
Fix some warnings a bit harder/different
This is an alternate fix to 262378 and a fix to a pessimizing-move
warning.
Modified:
llvm/trunk/include/llvm/ProfileData/ProfileCommon.h
llvm/trunk/lib/LTO/LTOModule.cpp
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=262390&r1=262389&r2=262390&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/ProfileCommon.h (original)
+++ llvm/trunk/include/llvm/ProfileData/ProfileCommon.h Tue Mar 1 14:41:17 2016
@@ -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;
Modified: llvm/trunk/lib/LTO/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=262390&r1=262389&r2=262390&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)
+++ llvm/trunk/lib/LTO/LTOModule.cpp Tue Mar 1 14:41:17 2016
@@ -151,7 +151,7 @@ LTOModule::createInLocalContext(std::uni
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>>
Modified: llvm/trunk/lib/ProfileData/ProfileSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/ProfileSummary.cpp?rev=262390&r1=262389&r2=262390&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/ProfileSummary.cpp (original)
+++ llvm/trunk/lib/ProfileData/ProfileSummary.cpp Tue Mar 1 14:41:17 2016
@@ -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(
More information about the llvm-commits
mailing list