File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1825,7 +1825,7 @@ static bool visitRecursivelyLifetimeEndingUses(
1825
1825
// separately checked in the verifier. It is the only check that verifies
1826
1826
// the structural requirements of on-stack partial_apply uses.
1827
1827
auto *user = use->getUser ();
1828
- if (user->getNumResults () != 1 ) {
1828
+ if (user->getNumResults () == 0 ) {
1829
1829
llvm::errs () << " partial_apply [on_stack] use:\n " ;
1830
1830
user->printInContext (llvm::errs ());
1831
1831
if (isa<BranchInst>(user)) {
@@ -1834,9 +1834,10 @@ static bool visitRecursivelyLifetimeEndingUses(
1834
1834
llvm::report_fatal_error (" partial_apply [on_stack] must be directly "
1835
1835
" forwarded to a destroy_value" );
1836
1836
}
1837
- if (!visitRecursivelyLifetimeEndingUses (use->getUser ()->getResult (0 ),
1838
- noUsers, func)) {
1839
- return false ;
1837
+ for (auto res : use->getUser ()->getResults ()) {
1838
+ if (!visitRecursivelyLifetimeEndingUses (res, noUsers, func)) {
1839
+ return false ;
1840
+ }
1840
1841
}
1841
1842
}
1842
1843
return true ;
You can’t perform that action at this time.
0 commit comments