Skip to content

Commit 1b848ac

Browse files
Merge pull request #73560 from nate-chandler/gardening/20240509/1
[Gardening] SIL: Verifier messages use "lifetime".
2 parents c09fa4e + bd9f9ea commit 1b848ac

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/SIL/Verifier/SILOwnershipVerifier.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ bool SILValueOwnershipChecker::checkFunctionArgWithoutLifetimeEndingUses(
491491
return true;
492492

493493
return !errorBuilder.handleMalformedSIL([&] {
494-
llvm::errs() << "Owned function parameter without life ending uses!\n"
494+
llvm::errs() << "Owned function parameter without lifetime ending uses!\n"
495495
<< "Value: " << *arg << '\n';
496496
});
497497
}
@@ -510,7 +510,7 @@ bool SILValueOwnershipChecker::checkYieldWithoutLifetimeEndingUses(
510510
return true;
511511
}
512512
return !errorBuilder.handleMalformedSIL([&] {
513-
llvm::errs() << "Owned yield without life ending uses!\n"
513+
llvm::errs() << "Owned yield without lifetime ending uses!\n"
514514
<< "Value: " << *yield << '\n';
515515
});
516516
case OwnershipKind::Guaranteed:
@@ -607,7 +607,7 @@ bool SILValueOwnershipChecker::isGuaranteedFunctionArgWithLifetimeEndingUses(
607607
return true;
608608

609609
return errorBuilder.handleMalformedSIL([&] {
610-
llvm::errs() << "Guaranteed function parameter with life ending uses!\n"
610+
llvm::errs() << "Guaranteed function parameter with lifetime ending uses!\n"
611611
<< "Value: " << *arg;
612612
for (const auto *use : lifetimeEndingUsers) {
613613
llvm::errs() << "Lifetime Ending User: " << *use->getUser();
@@ -620,7 +620,7 @@ bool SILValueOwnershipChecker::isSubobjectProjectionWithLifetimeEndingUses(
620620
SILValue value,
621621
const llvm::SmallVectorImpl<Operand *> &lifetimeEndingUsers) const {
622622
return errorBuilder.handleMalformedSIL([&] {
623-
llvm::errs() << "Subobject projection with life ending uses!\n"
623+
llvm::errs() << "Subobject projection with lifetime ending uses!\n"
624624
<< "Value: " << *value;
625625
for (const auto *use : lifetimeEndingUsers) {
626626
llvm::errs() << "Lifetime Ending User: " << *use->getUser();

test/SIL/OwnershipVerifier/begin_apply_use_after_end_apply.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sil @use_klass : $@convention(thin) (@guaranteed Klass) -> ()
2121
// CHECK: Error#: 0. End Error in Function: 'guaranteed_coroutine_caller'
2222

2323
// CHECK-LABEL: Error#: 1. Begin Error in Function: 'guaranteed_coroutine_caller'
24-
// CHECK: Owned yield without life ending uses!
24+
// CHECK: Owned yield without lifetime ending uses!
2525
// CHECK: Value: (**%7**, %8) = begin_apply %1() : $@yield_once @convention(thin) () -> @yields @owned Klass // user: %10
2626
// CHECK: Error#: 1. End Error in Function: 'guaranteed_coroutine_caller'
2727

@@ -34,7 +34,7 @@ sil @use_klass : $@convention(thin) (@guaranteed Klass) -> ()
3434
// CHECK: Error#: 2. End Error in Function: 'guaranteed_coroutine_caller'
3535

3636
// CHECK-LABEL: Error#: 3. Begin Error in Function: 'guaranteed_coroutine_caller'
37-
// CHECK: Owned yield without life ending uses!
37+
// CHECK: Owned yield without lifetime ending uses!
3838
// CHECK: Value: (**%16**, %17) = begin_apply %1() : $@yield_once @convention(thin) () -> @yields @owned Klass // user: %18
3939
// CHECK: Error#: 3. End Error in Function: 'guaranteed_coroutine_caller'
4040

0 commit comments

Comments
 (0)