We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9fd85fd + 99d5464 commit 9611189Copy full SHA for 9611189
lib/SILGen/ResultPlan.cpp
@@ -81,7 +81,7 @@ class IndirectOpenedSelfCleanup final : public Cleanup {
81
assert(box && "buffer never emitted before activating cleanup?!");
82
auto theBox = box;
83
if (SGF.getASTContext().SILOpts.supportsLexicalLifetimes(SGF.getModule())) {
84
- if (auto *bbi = cast<BeginBorrowInst>(theBox)) {
+ if (auto *bbi = dyn_cast<BeginBorrowInst>(theBox)) {
85
SGF.B.createEndBorrow(loc, bbi);
86
theBox = bbi->getOperand();
87
}
0 commit comments