Skip to content

Commit c039424

Browse files
committed
Enforce ownership for pullback
1 parent 3c4612d commit c039424

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/Differentiation/VJPCloner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,8 @@ class VJPCloner::Implementation final
12301230
// %enum = enum $Optional<PullbackType>, #Optional.some!enumelt,
12311231
// %pullback : $PullbackType
12321232
pullback = trampolineBuilder.createEnum(loc, pullback, someEltDecl,
1233-
SILType::getOptionalType(pullback->getType()));
1233+
SILType::getOptionalType(pullback->getType()),
1234+
OwnershipKind::Owned);
12341235
pullbackValues[origBB].push_back(pullback);
12351236

12361237
auto tupleLoweredTy = remapType(pullbackInfo.getLinearMapTupleLoweredType(origBB));

0 commit comments

Comments
 (0)