Skip to content

Commit c071399

Browse files
committed
Fix inverted condition in MemoryLifetimeVerifier
(cherry picked from commit 00a93d9)
1 parent 9b4bfd0 commit c071399

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
@@ -749,8 +749,7 @@ void MemoryLifetimeVerifier::checkBlock(SILBasicBlock *block, Bits &bits) {
749749
// an alloc_stack), which don't have any `op_deref` in its
750750
// di-expression, because that memory doesn't need to be initialized
751751
// when `debug_value` is referencing it.
752-
if (cast<DebugValueInst>(&I)->hasAddrVal() &&
753-
cast<DebugValueInst>(&I)->exprStartsWithDeref())
752+
if (!DebugValueInst::hasAddrVal(&I))
754753
requireBitsSet(bits, I.getOperand(0), &I);
755754
break;
756755
case SILInstructionKind::UncheckedTakeEnumDataAddrInst: {

0 commit comments

Comments
 (0)