Skip to content

Commit 3cbe0bc

Browse files
[CodeGen] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
1 parent 543f13c commit 3cbe0bc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ class Polynomial {
171171
};
172172

173173
/// Number of Error Bits e
174-
unsigned ErrorMSBs;
174+
unsigned ErrorMSBs = (unsigned)-1;
175175

176176
/// Value
177-
Value *V;
177+
Value *V = nullptr;
178178

179179
/// Coefficient B
180180
SmallVector<std::pair<BOps, APInt>, 4> B;
@@ -183,7 +183,7 @@ class Polynomial {
183183
APInt A;
184184

185185
public:
186-
Polynomial(Value *V) : ErrorMSBs((unsigned)-1), V(V) {
186+
Polynomial(Value *V) : V(V) {
187187
IntegerType *Ty = dyn_cast<IntegerType>(V->getType());
188188
if (Ty) {
189189
ErrorMSBs = 0;
@@ -193,12 +193,12 @@ class Polynomial {
193193
}
194194

195195
Polynomial(const APInt &A, unsigned ErrorMSBs = 0)
196-
: ErrorMSBs(ErrorMSBs), V(nullptr), A(A) {}
196+
: ErrorMSBs(ErrorMSBs), A(A) {}
197197

198198
Polynomial(unsigned BitWidth, uint64_t A, unsigned ErrorMSBs = 0)
199-
: ErrorMSBs(ErrorMSBs), V(nullptr), A(BitWidth, A) {}
199+
: ErrorMSBs(ErrorMSBs), A(BitWidth, A) {}
200200

201-
Polynomial() : ErrorMSBs((unsigned)-1), V(nullptr) {}
201+
Polynomial() = default;
202202

203203
/// Increment and clamp the number of undefined bits.
204204
void incErrorMSBs(unsigned amt) {

0 commit comments

Comments
 (0)