[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

@@ -699,9 +699,10 @@ void SILGenFunction::emitCaptures(SILLocation loc,
assert(!isPack);
auto addr = emitTemporaryAllocation(
vd, entryValue->getType(), DoesNotHaveDynamicLifetime, IsNotLexical,
/*generateDebugInfo*/ false);
auto addr = emitTemporaryAllocation(vd, entryValue->getType(),
DoesNotHaveDynamicLifetime,
IsNotLexical, IsNotFromVarDecl,
/*generateDebugInfo*/ false);
auto val = B.emitCopyValueOperation(loc, entryValue);
auto &lowering = getTypeLowering(entryValue->getType());
lowering.emitStore(B, loc, val, addr, StoreOwnershipQualifier::Init);