From: Eric Christopher Date: Tue, 30 Apr 2019 21:44:21 +0000 (+0000) Subject: Fix a few -Werror warnings: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6696a873d8aec70e13ab20560fd331aa7c9c4967;p=llvm Fix a few -Werror warnings: - Remove a variable only used in an assert - Fix pessimizing move warning around copy elision git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359617 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index 560e39038a5..582049eabfb 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/lib/ProfileData/InstrProf.cpp @@ -535,8 +535,7 @@ void InstrProfRecord::overlapValueProfData(uint32_t ValueKind, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap) { uint32_t ThisNumValueSites = getNumValueSites(ValueKind); - uint32_t OtherNumValueSites = Other.getNumValueSites(ValueKind); - assert(ThisNumValueSites == OtherNumValueSites); + assert(ThisNumValueSites == Other.getNumValueSites(ValueKind)); if (!ThisNumValueSites) return; @@ -1183,10 +1182,10 @@ Error OverlapStats::accumuateCounts(const std::string &BaseFilename, }; auto Ret = getProfileSum(BaseFilename, Base); if (Ret) - return std::move(Ret); + return Ret; Ret = getProfileSum(TestFilename, Test); if (Ret) - return std::move(Ret); + return Ret; this->BaseFilename = &BaseFilename; this->TestFilename = &TestFilename; Valid = true;