[llvm] r359617 - Fix a few -Werror warnings:

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 14:44:21 PDT 2019


Author: echristo
Date: Tue Apr 30 14:44:21 2019
New Revision: 359617

URL: http://llvm.org/viewvc/llvm-project?rev=359617&view=rev
Log:
Fix a few -Werror warnings:
 - Remove a variable only used in an assert
 - Fix pessimizing move warning around copy elision

Modified:
    llvm/trunk/lib/ProfileData/InstrProf.cpp

Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=359617&r1=359616&r2=359617&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Tue Apr 30 14:44:21 2019
@@ -535,8 +535,7 @@ void InstrProfRecord::overlapValueProfDa
                                            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(cons
   };
   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;




More information about the llvm-commits mailing list