[llvm] 5daf674 - ProfileSummary.h - remove unnecessary std::move.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 03:46:48 PST 2024


Author: Simon Pilgrim
Date: 2024-01-23T11:46:36Z
New Revision: 5daf674feba0f57b083113ad7ed486cad433a916

URL: https://github.com/llvm/llvm-project/commit/5daf674feba0f57b083113ad7ed486cad433a916
DIFF: https://github.com/llvm/llvm-project/commit/5daf674feba0f57b083113ad7ed486cad433a916.diff

LOG: ProfileSummary.h - remove unnecessary std::move.

The constructor args are passed by reference since d6790a0a3ce769fc6f37b2577c074d30cb92dbc2

Fixes MSVC static analysis warning

Added: 
    

Modified: 
    llvm/include/llvm/IR/ProfileSummary.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/ProfileSummary.h b/llvm/include/llvm/IR/ProfileSummary.h
index 4bb6bb8d4a405d..b23d5a30846a24 100644
--- a/llvm/include/llvm/IR/ProfileSummary.h
+++ b/llvm/include/llvm/IR/ProfileSummary.h
@@ -73,10 +73,10 @@ class ProfileSummary {
                  uint64_t MaxInternalCount, uint64_t MaxFunctionCount,
                  uint32_t NumCounts, uint32_t NumFunctions,
                  bool Partial = false, double PartialProfileRatio = 0)
-      : PSK(K), DetailedSummary(std::move(DetailedSummary)),
-        TotalCount(TotalCount), MaxCount(MaxCount),
-        MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount),
-        NumCounts(NumCounts), NumFunctions(NumFunctions), Partial(Partial),
+      : PSK(K), DetailedSummary(DetailedSummary), TotalCount(TotalCount),
+        MaxCount(MaxCount), MaxInternalCount(MaxInternalCount),
+        MaxFunctionCount(MaxFunctionCount), NumCounts(NumCounts),
+        NumFunctions(NumFunctions), Partial(Partial),
         PartialProfileRatio(PartialProfileRatio) {}
 
   Kind getKind() const { return PSK; }


        


More information about the llvm-commits mailing list