Skip to content

Commit d44c7a1

Browse files
committed
[Gardening] SIL: Move comment.
Move it to the lambda which it talks about. The old location is in a function which now enjoys multiple callers, and the comment applies to only one.
1 parent 79f29c8 commit d44c7a1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/SIL/IR/SILInstruction.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,16 +1850,7 @@ visitRecursivelyLifetimeEndingUses(
18501850
continue;
18511851
}
18521852
// FIXME: Handle store to indirect result
1853-
1854-
// There shouldn't be any dead-end consumptions of a nonescaping
1855-
// partial_apply that don't forward it along, aside from destroy_value.
1856-
//
1857-
// On-stack partial_apply cannot be cloned, so it should never be used by a
1858-
// BranchInst.
1859-
//
1860-
// This is a fatal error because it performs SIL verification that is not
1861-
// separately checked in the verifier. It is the only check that verifies
1862-
// the structural requirements of on-stack partial_apply uses.
1853+
18631854
auto *user = use->getUser();
18641855
if (user->getNumResults() == 0) {
18651856
return visitUnknownUse(use);
@@ -1882,7 +1873,16 @@ PartialApplyInst::visitOnStackLifetimeEnds(
18821873
&& "only meaningful for OSSA stack closures");
18831874
bool noUsers = true;
18841875

1885-
auto visitUnknownUse = [](Operand *unknownUse){
1876+
auto visitUnknownUse = [](Operand *unknownUse) {
1877+
// There shouldn't be any dead-end consumptions of a nonescaping
1878+
// partial_apply that don't forward it along, aside from destroy_value.
1879+
//
1880+
// On-stack partial_apply cannot be cloned, so it should never be used by a
1881+
// BranchInst.
1882+
//
1883+
// This is a fatal error because it performs SIL verification that is not
1884+
// separately checked in the verifier. It is the only check that verifies
1885+
// the structural requirements of on-stack partial_apply uses.
18861886
llvm::errs() << "partial_apply [on_stack] use:\n";
18871887
auto *user = unknownUse->getUser();
18881888
user->printInContext(llvm::errs());

0 commit comments

Comments
 (0)