Skip to content

Commit

Permalink
[mlir][Quasipolynomial] Fixed -Wunused-variable in GeneratorFunction.h (
Browse files Browse the repository at this point in the history
llvm#76419)

```
llvm-project/mlir/lib/Analysis/Presburger/GeneratingFunction.h:56:28:
error: unused variable 'term' [-Werror,-Wunused-variable]
   56 |     for (const ParamPoint &term : numerators)
      |                            ^~~~
1 error generated.
```
  • Loading branch information
bviyer authored Dec 27, 2023
1 parent ce0c149 commit 36fd729
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mlir/lib/Analysis/Presburger/GeneratingFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ class GeneratingFunction {
std::vector<ParamPoint> nums,
std::vector<std::vector<Point>> dens)
: numParam(numParam), signs(signs), numerators(nums), denominators(dens) {
#ifndef NDEBUG
for (const ParamPoint &term : numerators)
assert(term.getNumColumns() == numParam + 1 &&
"dimensionality of numerator exponents does not match number of "
"parameters!");
#endif // NDEBUG
}

unsigned getNumParams() { return numParam; }
Expand Down

0 comments on commit 36fd729

Please sign in to comment.