Skip to content

Commit ff9e2aa

Browse files
committed
[CanOSSALifetime] Respect lexical lifetimes attr.
1 parent 7c81340 commit ff9e2aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ class CanonicalizeOSSALifetime final {
414414
bool respectsDeinitBarriers() const {
415415
if (!currentDef->isLexical())
416416
return false;
417+
if (currentDef->getFunction()->forceEnableLexicalLifetimes())
418+
return true;
417419
auto &module = currentDef->getFunction()->getModule();
418420
return module.getASTContext().SILOpts.supportsLexicalLifetimes(module);
419421
}

0 commit comments

Comments
 (0)