Skip to content

Commit 95bd329

Browse files
committed
Swift SIL: bridge the hasPointerEscape flags of MoveValueInst and BeginBorrowInst
1 parent 9eddb24 commit 95bd329

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ final public class MoveValueInst : SingleValueInstruction, UnaryInstruction {
10151015
public var fromValue: Value { operand.value }
10161016

10171017
public var isLexical: Bool { bridged.MoveValue_isLexical() }
1018-
1018+
public var hasPointerEscape: Bool { bridged.MoveValue_hasPointerEscape() }
10191019
public var isFromVarDecl: Bool { bridged.MoveValue_isFromVarDecl() }
10201020
}
10211021

@@ -1231,7 +1231,7 @@ final public class BeginBorrowInst : SingleValueInstruction, UnaryInstruction, B
12311231
public var borrowedValue: Value { operand.value }
12321232

12331233
public var isLexical: Bool { bridged.BeginBorrow_isLexical() }
1234-
1234+
public var hasPointerEscape: Bool { bridged.BeginBorrow_hasPointerEscape() }
12351235
public var isFromVarDecl: Bool { bridged.BeginBorrow_isFromVarDecl() }
12361236

12371237
public var endOperands: LazyFilterSequence<UseList> {

include/swift/SIL/SILBridging.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,10 @@ struct BridgedInstruction {
943943
BRIDGED_INLINE OptionalBridgedValue StructInst_getUniqueNonTrivialFieldValue() const;
944944
BRIDGED_INLINE SwiftInt StructElementAddrInst_fieldIndex() const;
945945
BRIDGED_INLINE bool BeginBorrow_isLexical() const;
946+
BRIDGED_INLINE bool BeginBorrow_hasPointerEscape() const;
946947
BRIDGED_INLINE bool BeginBorrow_isFromVarDecl() const;
947948
BRIDGED_INLINE bool MoveValue_isLexical() const;
949+
BRIDGED_INLINE bool MoveValue_hasPointerEscape() const;
948950
BRIDGED_INLINE bool MoveValue_isFromVarDecl() const;
949951

950952
BRIDGED_INLINE SwiftInt ProjectBoxInst_fieldIndex() const;

include/swift/SIL/SILBridgingImpl.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,10 @@ bool BridgedInstruction::BeginBorrow_isLexical() const {
10831083
return getAs<swift::BeginBorrowInst>()->isLexical();
10841084
}
10851085

1086+
bool BridgedInstruction::BeginBorrow_hasPointerEscape() const {
1087+
return getAs<swift::BeginBorrowInst>()->hasPointerEscape();
1088+
}
1089+
10861090
bool BridgedInstruction::BeginBorrow_isFromVarDecl() const {
10871091
return getAs<swift::BeginBorrowInst>()->isFromVarDecl();
10881092
}
@@ -1091,6 +1095,10 @@ bool BridgedInstruction::MoveValue_isLexical() const {
10911095
return getAs<swift::MoveValueInst>()->isLexical();
10921096
}
10931097

1098+
bool BridgedInstruction::MoveValue_hasPointerEscape() const {
1099+
return getAs<swift::MoveValueInst>()->hasPointerEscape();
1100+
}
1101+
10941102
bool BridgedInstruction::MoveValue_isFromVarDecl() const {
10951103
return getAs<swift::MoveValueInst>()->isFromVarDecl();
10961104
}

0 commit comments

Comments
 (0)