@@ -255,7 +255,7 @@ class DestroyLocalVariable : public Cleanup {
255255 void emit (SILGenFunction &SGF, CleanupLocation l,
256256 ForUnwind_t forUnwind) override {
257257 SILValue val = SGF.VarLocs [Var].value ;
258- if (SGF.getASTContext ().LangOpts .EnableExperimentalLexicalLifetimes &&
258+ if (SGF.getASTContext ().SILOpts .EnableExperimentalLexicalLifetimes &&
259259 val->getOwnershipKind () != OwnershipKind::None)
260260 SGF.B .createEndBorrow (l, val);
261261 SGF.destroyLocalVariable (l, Var);
@@ -526,7 +526,7 @@ class LetValueInitialization : public Initialization {
526526 address = value;
527527 SILLocation PrologueLoc (vd);
528528
529- if (SGF.getASTContext ().LangOpts .EnableExperimentalLexicalLifetimes &&
529+ if (SGF.getASTContext ().SILOpts .EnableExperimentalLexicalLifetimes &&
530530 value->getOwnershipKind () != OwnershipKind::None)
531531 value = SILValue (
532532 SGF.B .createBeginBorrow (PrologueLoc, value, /* isLexical*/ true ));
@@ -1717,7 +1717,7 @@ void SILGenFunction::destroyLocalVariable(SILLocation silLoc, VarDecl *vd) {
17171717 SILValue Val = loc.value ;
17181718 if (!Val->getType ().isAddress ()) {
17191719 SILValue valueToBeDestroyed;
1720- if (getASTContext ().LangOpts .EnableExperimentalLexicalLifetimes &&
1720+ if (getASTContext ().SILOpts .EnableExperimentalLexicalLifetimes &&
17211721 Val->getOwnershipKind () != OwnershipKind::None) {
17221722 auto *inst = cast<BeginBorrowInst>(Val.getDefiningInstruction ());
17231723 valueToBeDestroyed = inst->getOperand ();
0 commit comments