Skip to content

Commit bc50837

Browse files
committed
ownership verifier: correctly handle OperandOwnership::NonUse
The verifier checked for `isTypeDependentOperand()` (which was the only NonUse operand case we had so far) instead of OperandOwnership::NonUse.
1 parent 9429514 commit bc50837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SIL/Verifier/SILOwnershipVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ bool SILValueOwnershipChecker::gatherNonGuaranteedUsers(
207207
for (auto *op : value->getUses()) {
208208
auto *user = op->getUser();
209209

210-
// If this op is a type dependent operand, skip it. It is not interesting
210+
// For example, type dependent operands are non-use. It is not interesting
211211
// from an ownership perspective.
212-
if (user->isTypeDependentOperand(*op))
212+
if (op->getOperandOwnership() == OperandOwnership::NonUse)
213213
continue;
214214

215215
// First check if this recursive use is compatible with our values ownership

0 commit comments

Comments
 (0)