[SILGen] Allocs for VDs are var_decl.

Annotate alloc_stack instructions that correspond to VarDecls with the
var_decl flag.
This commit is contained in:
Nate Chandler
2024-03-08 17:46:37 -08:00
parent 7884892d08
commit dff0b2efaa
30 changed files with 114 additions and 108 deletions

View File

@@ -863,6 +863,7 @@ private:
if (auto *allocStack = dyn_cast<AllocStackInst>(argrv.getValue())) {
allocStack->setArgNo(ArgNo);
allocStack->setIsFromVarDecl();
if (SGF.getASTContext().SILOpts.supportsLexicalLifetimes(
SGF.getModule()) &&
SGF.F.getLifetime(pd, allocStack->getType()).isLexical())