Skip to content

Commit c942e9a

Browse files
committed
Enforce ownership for pullback
1 parent 4ae64aa commit c942e9a

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
@@ -1227,7 +1227,8 @@ class VJPCloner::Implementation final
12271227
// %enum = enum $Optional<PullbackType>, #Optional.some!enumelt,
12281228
// %pullback : $PullbackType
12291229
pullback = trampolineBuilder.createEnum(loc, pullback, someEltDecl,
1230-
SILType::getOptionalType(pullback->getType()));
1230+
SILType::getOptionalType(pullback->getType()),
1231+
OwnershipKind::Owned);
12311232
pullbackValues[origBB].push_back(pullback);
12321233

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

0 commit comments

Comments
 (0)