Skip to content

Commit 538ef6a

Browse files
[CFIFixup] Add a default constructor to BlockFlags (NFC)
This patch adds a default constructor to BlockFlags to initialize its members to false.
1 parent 7444ccd commit 538ef6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/CodeGen/CFIFixup.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,17 @@ struct BlockFlags {
131131
bool StrongNoFrameOnEntry : 1;
132132
bool HasFrameOnEntry : 1;
133133
bool HasFrameOnExit : 1;
134+
BlockFlags()
135+
: Reachable(false), StrongNoFrameOnEntry(false), HasFrameOnEntry(false),
136+
HasFrameOnExit(false) {}
134137
};
135138

136139
// Computes the frame information for each block in the function. Frame info
137140
// for a block is inferred from its predecessors.
138141
static SmallVector<BlockFlags>
139142
computeBlockInfo(const MachineFunction &MF,
140143
const MachineBasicBlock *PrologueBlock) {
141-
SmallVector<BlockFlags, 32> BlockInfo(MF.getNumBlockIDs(),
142-
{false, false, false, false});
144+
SmallVector<BlockFlags, 32> BlockInfo(MF.getNumBlockIDs());
143145
BlockInfo[0].Reachable = true;
144146
BlockInfo[0].StrongNoFrameOnEntry = true;
145147

0 commit comments

Comments
 (0)