[Mlir-commits] [mlir] c86fe3e - [mlir][Quasipolynomials] Fix -Wunused-variable in QuasiPolynomial.cpp (NFC)
Jie Fu
llvmlistbot at llvm.org
Tue Dec 26 16:01:44 PST 2023
Author: Jie Fu
Date: 2023-12-27T08:00:58+08:00
New Revision: c86fe3ee0b92934f5d18394d9a0cdc1d3f0eef64
URL: https://github.com/llvm/llvm-project/commit/c86fe3ee0b92934f5d18394d9a0cdc1d3f0eef64
DIFF: https://github.com/llvm/llvm-project/commit/c86fe3ee0b92934f5d18394d9a0cdc1d3f0eef64.diff
LOG: [mlir][Quasipolynomials] Fix -Wunused-variable in QuasiPolynomial.cpp (NFC)
llvm-project/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp:29:39:
error: unused variable 'aff' [-Werror,-Wunused-variable]
for (const SmallVector<Fraction> &aff : term) {
^
1 error generated.
Added:
Modified:
mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp b/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
index 902e3ced472f82..3ae4fb726215f7 100644
--- a/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
+++ b/mlir/lib/Analysis/Presburger/QuasiPolynomial.cpp
@@ -20,6 +20,7 @@ QuasiPolynomial::QuasiPolynomial(
: PresburgerSpace(/*numDomain=*/numVars, /*numRange=*/1, /*numSymbols=*/0,
/*numLocals=*/0),
coefficients(coeffs), affine(aff) {
+#ifndef NDEBUG
// For each term which involves at least one affine function,
for (const std::vector<SmallVector<Fraction>> &term : affine) {
if (term.size() == 0)
@@ -32,6 +33,7 @@ QuasiPolynomial::QuasiPolynomial(
"symbols!");
}
}
+#endif // NDEBUG
}
QuasiPolynomial QuasiPolynomial::operator+(const QuasiPolynomial &x) const {
More information about the Mlir-commits
mailing list