1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[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.
This commit is contained in:
Kazu Hirata 2021-07-25 06:56:47 -07:00
parent 2aaf1231f6
commit 3e06079a92

View File

@ -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; }