Skip to content

Commit 4f8cbf6

Browse files
committed
[SILBuilder] Add flags to emit{Move,Borrow}Op.
1 parent adbb10d commit 4f8cbf6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

include/swift/SIL/SILBuilder.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,11 +829,14 @@ class SILBuilder {
829829
return createLoadBorrow(loc, v);
830830
}
831831

832-
SILValue emitBeginBorrowOperation(SILLocation loc, SILValue v) {
832+
SILValue emitBeginBorrowOperation(SILLocation loc, SILValue v,
833+
bool isLexical = false,
834+
bool hasPointerEscape = false,
835+
bool fromVarDecl = false) {
833836
if (!hasOwnership() ||
834837
v->getOwnershipKind().isCompatibleWith(OwnershipKind::Guaranteed))
835838
return v;
836-
return createBeginBorrow(loc, v);
839+
return createBeginBorrow(loc, v, isLexical, hasPointerEscape, fromVarDecl);
837840
}
838841

839842
void emitEndBorrowOperation(SILLocation loc, SILValue v) {
@@ -2817,13 +2820,16 @@ class SILBuilder {
28172820

28182821
/// Convenience function that is a no-op for trivial values and inserts a
28192822
/// move_value on non-trivial instructions.
2820-
SILValue emitMoveValueOperation(SILLocation Loc, SILValue v) {
2823+
SILValue emitMoveValueOperation(SILLocation Loc, SILValue v,
2824+
bool isLexical = false,
2825+
bool hasPointerEscape = false,
2826+
bool fromVarDecl = false) {
28212827
assert(!v->getType().isAddress());
28222828
if (v->getType().isTrivial(*getInsertionBB()->getParent()))
28232829
return v;
28242830
assert(v->getOwnershipKind() == OwnershipKind::Owned &&
28252831
"move_value consumes its argument");
2826-
return createMoveValue(Loc, v);
2832+
return createMoveValue(Loc, v, isLexical, hasPointerEscape, fromVarDecl);
28272833
}
28282834

28292835
SILValue emitTupleExtract(SILLocation Loc, SILValue Operand, unsigned FieldNo,

0 commit comments

Comments
 (0)