Skip to content

Commit c1a105a

Browse files
committed
SILOwnershipVerifier: rename users to uses.
For basic sanity. Users are instructions, not operands.
1 parent c9e533e commit c1a105a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/SIL/Verifier/SILOwnershipVerifier.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ bool SILValueOwnershipChecker::gatherUsers(
288288
// Ok, we have some sort of borrow introducer. We need to recursively validate
289289
// that all of its uses (including sub-scopes) are before any end_borrows that
290290
// may end the lifetime of the borrow introducer. With that in mind, gather up
291-
// our initial list of users.
292-
SmallVector<Operand *, 8> users;
293-
llvm::copy(value->getUses(), std::back_inserter(users));
291+
// our initial list of uses.
292+
SmallVector<Operand *, 8> uses;
293+
llvm::copy(value->getUses(), std::back_inserter(uses));
294294

295295
bool foundError = false;
296-
while (!users.empty()) {
297-
Operand *op = users.pop_back_val();
296+
while (!uses.empty()) {
297+
Operand *op = uses.pop_back_val();
298298
SILInstruction *user = op->getUser();
299299

300300
// If this op is a type dependent operand, skip it. It is not interesting
@@ -416,7 +416,7 @@ bool SILValueOwnershipChecker::gatherUsers(
416416
assert(result->getOwnershipKind() == OwnershipKind::Guaranteed &&
417417
"Our value is guaranteed and this is a forwarding instruction. "
418418
"Should have guaranteed ownership as well.");
419-
llvm::copy(result->getUses(), std::back_inserter(users));
419+
llvm::copy(result->getUses(), std::back_inserter(uses));
420420
}
421421
continue;
422422
}
@@ -452,7 +452,7 @@ bool SILValueOwnershipChecker::gatherUsers(
452452

453453
// Otherwise add all users of this BBArg to the worklist to visit
454454
// recursively.
455-
llvm::copy(succArg->getUses(), std::back_inserter(users));
455+
llvm::copy(succArg->getUses(), std::back_inserter(uses));
456456
}
457457
}
458458

0 commit comments

Comments
 (0)