[llvm] 4e288a8 - [Inline] Fix a warning by removing an explicit copy constructor

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 25 06:57:02 PDT 2021


Author: Kazu Hirata
Date: 2021-07-25T06:56:47-07:00
New Revision: 4e288a85283fe632cbdf004abc2ca7a7711823f3

URL: https://github.com/llvm/llvm-project/commit/4e288a85283fe632cbdf004abc2ca7a7711823f3
DIFF: https://github.com/llvm/llvm-project/commit/4e288a85283fe632cbdf004abc2ca7a7711823f3.diff

LOG: [Inline] Fix a warning by removing an explicit copy constructor

This patches fixes the warning:

  llvm/include/llvm/Analysis/InlineCost.h:62:3: error: definition of
  implicit copy assignment operator for 'CostBenefitPair' is
  deprecated because it has a user-declared copy constructor
  [-Werror,-Wdeprecated-copy]

by removing the explicit copy constructor.

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/InlineCost.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/InlineCost.h b/llvm/include/llvm/Analysis/InlineCost.h
index 3d27fa3bdd9c..c42f830c4274 100644
--- a/llvm/include/llvm/Analysis/InlineCost.h
+++ b/llvm/include/llvm/Analysis/InlineCost.h
@@ -59,8 +59,6 @@ const uint64_t MaxSimplifiedDynamicAllocaToInline = 65536;
 class CostBenefitPair {
 public:
   CostBenefitPair(APInt Cost, APInt Benefit) : Cost(Cost), Benefit(Benefit) {}
-  CostBenefitPair(const CostBenefitPair &CBP)
-      : Cost(CBP.getCost()), Benefit(CBP.getBenefit()) {}
 
   const APInt &getCost() const { return Cost; }
 


        


More information about the llvm-commits mailing list