]> granicus.if.org Git - llvm/commitdiff
Fix a few -Werror warnings:
authorEric Christopher <echristo@gmail.com>
Tue, 30 Apr 2019 21:44:21 +0000 (21:44 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 30 Apr 2019 21:44:21 +0000 (21:44 +0000)
 - 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

lib/ProfileData/InstrProf.cpp

index 560e39038a5e2880df488de55e437f5060e2194b..582049eabfb4237f06e6617ef7ade19d0d9801d0 100644 (file)
@@ -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;