From d04fd4785318d33ffe6656e39077e5b4b8cfff09 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 3 May 2025 09:26:39 -0700 Subject: [PATCH] [Scalar] Use default member initialization in OverflowTracking (NFC) --- llvm/include/llvm/Transforms/Scalar/Reassociate.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/include/llvm/Transforms/Scalar/Reassociate.h b/llvm/include/llvm/Transforms/Scalar/Reassociate.h index 6d56961a71019..23b70164d96a4 100644 --- a/llvm/include/llvm/Transforms/Scalar/Reassociate.h +++ b/llvm/include/llvm/Transforms/Scalar/Reassociate.h @@ -65,16 +65,14 @@ struct Factor { }; struct OverflowTracking { - bool HasNUW; - bool HasNSW; - bool AllKnownNonNegative; - bool AllKnownNonZero; + bool HasNUW = true; + bool HasNSW = true; + bool AllKnownNonNegative = true; + bool AllKnownNonZero = true; // Note: AllKnownNonNegative can be true in a case where one of the operands // is negative, but one the operators is not NSW. AllKnownNonNegative should // not be used independently of HasNSW - OverflowTracking() - : HasNUW(true), HasNSW(true), AllKnownNonNegative(true), - AllKnownNonZero(true) {} + OverflowTracking() = default; }; class XorOpnd;