Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MLIR][Presburger] Make constructors from PresburgerSpace explicit
This patch makes constructors of IntegerRelation, IntegerPolyhedron, PresburgerRelation, PresburgerSet from PresburgerSpace explicit. This prevents bugs like: ``` void fun(IntegerRelation a, IntegerRelation b) { IntegerPolyhedron c = a.intersect(b); } ``` Here, `a.intersect(b)` will return `IntegerRelation`, which will be implicitly converted to `PresburgerSpace` and will use the `PresburgerSpace` constructor for IntegerPolyhedron. Leading to loss of any constraints in the intersection of `a` and `b`. After this patch, this will give a compile error. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D122972
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters