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 1281f59 + 132eb93 commit e9253b7Copy full SHA for e9253b7
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