Merge pull request #69824 from DougGregor/typed-throws-fixes

Yet more typed throws fixes
This commit is contained in:
Doug Gregor
2023-11-13 19:30:48 -08:00
committed by GitHub
5 changed files with 63 additions and 23 deletions

View File

@@ -640,7 +640,8 @@ public:
if (auto tryApplyInst = dyn_cast<TryApplyInst>(inst)) {
foundResults.emplace_back(tryApplyInst->getNormalBB()->getArgument(0));
foundResults.emplace_back(tryApplyInst->getErrorBB()->getArgument(0));
if (tryApplyInst->getErrorBB()->getNumArguments() > 0)
foundResults.emplace_back(tryApplyInst->getErrorBB()->getArgument(0));
return;
}