Skip to content

Commit 0ea22e5

Browse files
committed
[JVPCloner] Cloned begin_borrow keeps flags.
1 parent 4f8cbf6 commit 0ea22e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILOptimizer/Differentiation/JVPCloner.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,9 @@ class JVPCloner::Implementation final
777777
auto &diffBuilder = getDifferentialBuilder();
778778
auto loc = bbi->getLoc();
779779
auto tanVal = materializeTangent(getTangentValue(bbi->getOperand()), loc);
780-
auto tanValBorrow = diffBuilder.emitBeginBorrowOperation(loc, tanVal);
780+
auto tanValBorrow = diffBuilder.emitBeginBorrowOperation(
781+
loc, tanVal, bbi->isLexical(), bbi->hasPointerEscape(),
782+
bbi->isFromVarDecl());
781783
setTangentValue(bbi->getParent(), bbi,
782784
makeConcreteTangentValue(tanValBorrow));
783785
}

0 commit comments

Comments
 (0)