Skip to content

Commit 7229561

Browse files
committed
Fix inverted condition in MemoryLifetimeVerifier
1 parent 768cfe4 commit 7229561

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/SIL/Verifier/MemoryLifetimeVerifier.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,7 @@ void MemoryLifetimeVerifier::checkBlock(SILBasicBlock *block, Bits &bits) {
756756
// an alloc_stack), which don't have any `op_deref` in its
757757
// di-expression, because that memory doesn't need to be initialized
758758
// when `debug_value` is referencing it.
759-
if (cast<DebugValueInst>(&I)->hasAddrVal() &&
760-
cast<DebugValueInst>(&I)->exprStartsWithDeref())
759+
if (!DebugValueInst::hasAddrVal(&I))
761760
requireBitsSet(bits, I.getOperand(0), &I);
762761
break;
763762
case SILInstructionKind::UncheckedTakeEnumDataAddrInst: {

0 commit comments

Comments
 (0)