Skip to content

Commit ca8c6d4

Browse files
committed
[DebugInfo] [AutoDiff] Fix empty debug variables being created
1 parent 3c1ef77 commit ca8c6d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/SILOptimizer/Differentiation/PullbackCloner.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1552,8 +1552,11 @@ class PullbackCloner::Implementation final
15521552
auto adjVal = materializeAdjointDirect(getAdjointValue(bb, inst), loc);
15531553
// Allocate a local buffer and store the adjoint value. This buffer will
15541554
// be used for accumulation into the adjoint buffer.
1555-
auto adjBuf = builder.createAllocStack(
1556-
loc, adjVal->getType(), SILDebugVariable());
1555+
auto adjBuf = builder.createAllocStack(loc, adjVal->getType(), {},
1556+
DoesNotHaveDynamicLifetime,
1557+
IsNotLexical, IsNotFromVarDecl,
1558+
DoesNotUseMoveableValueDebugInfo,
1559+
/* skipVarDeclAssert = */ true);
15571560
auto copy = builder.emitCopyValueOperation(loc, adjVal);
15581561
builder.emitStoreValueOperation(loc, copy, adjBuf,
15591562
StoreOwnershipQualifier::Init);

0 commit comments

Comments
 (0)