Skip to content

Commit cf033bb

Browse files
committed
[DebugInfo][NFC] Zero-initialize a class field
This field gets assigned when the relevant object starts being used; but it remains uninitialized beforehand. This risks introducing hard-to-detect bugs if something changes, so zero-initialize the field.
1 parent 9da5140 commit cf033bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ class VLocTracker {
574574
/// much later stage, in the TransferTracker class.
575575
MapVector<DebugVariable, DbgValue> Vars;
576576
DenseMap<DebugVariable, const DILocation *> Scopes;
577-
MachineBasicBlock *MBB;
577+
MachineBasicBlock *MBB = nullptr;
578578

579579
public:
580580
VLocTracker() {}

0 commit comments

Comments
 (0)