Skip to content

Commit b1f1329

Browse files
[Scalar] Use default member initialization in OverflowTracking (NFC) (#138412)
1 parent bb1e3df commit b1f1329

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

llvm/include/llvm/Transforms/Scalar/Reassociate.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,14 @@ struct Factor {
6565
};
6666

6767
struct OverflowTracking {
68-
bool HasNUW;
69-
bool HasNSW;
70-
bool AllKnownNonNegative;
71-
bool AllKnownNonZero;
68+
bool HasNUW = true;
69+
bool HasNSW = true;
70+
bool AllKnownNonNegative = true;
71+
bool AllKnownNonZero = true;
7272
// Note: AllKnownNonNegative can be true in a case where one of the operands
7373
// is negative, but one the operators is not NSW. AllKnownNonNegative should
7474
// not be used independently of HasNSW
75-
OverflowTracking()
76-
: HasNUW(true), HasNSW(true), AllKnownNonNegative(true),
77-
AllKnownNonZero(true) {}
75+
OverflowTracking() = default;
7876
};
7977

8078
class XorOpnd;

0 commit comments

Comments
 (0)