Skip to content

Commit b23cd42

Browse files
committed
[SIL] Lifetime depends on supported features.
Instances of every type have a EagerMove lifetimes when lexical lifetimes are disabled.
1 parent fd32f2a commit b23cd42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/SIL/IR/SILType.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ bool SILType::isNoReturnFunction(SILModule &M,
176176
}
177177

178178
Lifetime SILType::getLifetime(const SILFunction &F) const {
179+
if (!F.getModule().Options.supportsLexicalLifetimes(F.getModule()))
180+
return Lifetime::EagerMove;
179181
auto contextType = hasTypeParameter() ? F.mapTypeIntoContext(*this) : *this;
180182
const auto &lowering = F.getTypeLowering(contextType);
181183
auto properties = lowering.getRecursiveProperties();

0 commit comments

Comments
 (0)