remove the const quantifier before temp variable
authorFeng Liu <fengliuai@google.com>
Fri, 29 Mar 2019 16:54:11 +0000 (09:54 -0700)
committerjpienaar <jpienaar@google.com>
Sat, 30 Mar 2019 00:56:27 +0000 (17:56 -0700)
PiperOrigin-RevId: 240997262

mlir/lib/TableGen/Pattern.cpp

index 853f394..a6c4095 100644 (file)
@@ -261,7 +261,7 @@ std::vector<tblgen::AppliedConstraint> tblgen::Pattern::getConstraints() const {
 int tblgen::Pattern::getBenefit() const {
   // The default benefit value is a heristic with number of ops in the source
   // pattern.
-  const int defaultBenefit = getSourcePattern().getNumOps();
+  int defaultBenefit = getSourcePattern().getNumOps();
   llvm::DagInit *delta = def.getValueAsDag("benefitDelta");
   if (delta->getNumArgs() != 1 || !isa<llvm::IntInit>(delta->getArg(0)))
     PrintFatalError(def.getLoc(), "The 'AddedBenefit' can only be an integer");