[NFC] Return instruction from createScopeEnd.

This commit is contained in:
Nate Chandler
2024-12-06 13:39:27 -08:00
parent be88e7c9d9
commit c47c8ea72b
2 changed files with 7 additions and 7 deletions

View File

@@ -151,16 +151,15 @@ AddressUseKind ScopedAddressValue::updateTransitiveLiveness(
return addressKind;
}
void ScopedAddressValue::createScopeEnd(SILBasicBlock::iterator insertPt,
SILLocation loc) const {
SILInstruction *
ScopedAddressValue::createScopeEnd(SILBasicBlock::iterator insertPt,
SILLocation loc) const {
switch (kind) {
case ScopedAddressValueKind::StoreBorrow: {
SILBuilderWithScope(insertPt).createEndBorrow(loc, value);
return;
return SILBuilderWithScope(insertPt).createEndBorrow(loc, value);
}
case ScopedAddressValueKind::BeginAccess: {
SILBuilderWithScope(insertPt).createEndAccess(loc, value, false);
return;
return SILBuilderWithScope(insertPt).createEndAccess(loc, value, false);
}
case ScopedAddressValueKind::Invalid:
llvm_unreachable("Using invalid case?!");