Skip to content

Commit c94d490

Browse files
committed
Revert "mlir/Presburger: guard dump function; fix buildbot (llvm#95218)"
This reverts commit 638d968.
1 parent ad9fe3b commit c94d490

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

mlir/include/mlir/Analysis/Presburger/Fraction.h

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,14 @@ struct Fraction {
5252
return num / den;
5353
}
5454

55-
/// The numerator and denominator, respectively. The denominator is always
56-
/// positive.
57-
DynamicAPInt num{0}, den{1};
58-
59-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6055
llvm::raw_ostream &print(llvm::raw_ostream &os) const {
6156
return os << "(" << num << "/" << den << ")";
6257
}
63-
#endif
64-
};
6558

66-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
67-
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const Fraction &x) {
68-
x.print(os);
69-
return os;
70-
}
71-
#endif
59+
/// The numerator and denominator, respectively. The denominator is always
60+
/// positive.
61+
DynamicAPInt num{0}, den{1};
62+
};
7263

7364
/// Three-way comparison between two fractions.
7465
/// Returns +1, 0, and -1 if the first fraction is greater than, equal to, or
@@ -165,6 +156,12 @@ inline Fraction &operator*=(Fraction &x, const Fraction &y) {
165156
x = x * y;
166157
return x;
167158
}
159+
160+
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &os, const Fraction &x) {
161+
x.print(os);
162+
return os;
163+
}
164+
168165
} // namespace presburger
169166
} // namespace mlir
170167

0 commit comments

Comments
 (0)