Skip to content

Commit 0b9a610

Browse files
[Transforms] Use default member initialization in ConditionInfo (NFC)
1 parent 930bf4e commit 0b9a610

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,23 @@ using namespace PatternMatch;
3333
namespace {
3434
struct ConditionInfo {
3535
/// Branch instruction with this condition
36-
BranchInst *BI;
36+
BranchInst *BI = nullptr;
3737
/// ICmp instruction with this condition
38-
ICmpInst *ICmp;
38+
ICmpInst *ICmp = nullptr;
3939
/// Preciate info
40-
ICmpInst::Predicate Pred;
40+
ICmpInst::Predicate Pred = ICmpInst::BAD_ICMP_PREDICATE;
4141
/// AddRec llvm value
42-
Value *AddRecValue;
42+
Value *AddRecValue = nullptr;
4343
/// Non PHI AddRec llvm value
4444
Value *NonPHIAddRecValue;
4545
/// Bound llvm value
46-
Value *BoundValue;
46+
Value *BoundValue = nullptr;
4747
/// AddRec SCEV
48-
const SCEVAddRecExpr *AddRecSCEV;
48+
const SCEVAddRecExpr *AddRecSCEV = nullptr;
4949
/// Bound SCEV
50-
const SCEV *BoundSCEV;
50+
const SCEV *BoundSCEV = nullptr;
5151

52-
ConditionInfo()
53-
: BI(nullptr), ICmp(nullptr), Pred(ICmpInst::BAD_ICMP_PREDICATE),
54-
AddRecValue(nullptr), BoundValue(nullptr), AddRecSCEV(nullptr),
55-
BoundSCEV(nullptr) {}
52+
ConditionInfo() = default;
5653
};
5754
} // namespace
5855

0 commit comments

Comments
 (0)