Skip to content

Commit af4ad78

Browse files
committed
Comment: add a FIXME in EndBorrowRange (need to remove this API)
1 parent d9619af commit af4ad78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/SIL/SILInstruction.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4038,6 +4038,10 @@ class BeginBorrowInst
40384038
lexical(isLexical) {}
40394039

40404040
public:
4041+
// FIXME: this does not return all instructions that end a local borrow
4042+
// scope. Branches can also end it via a reborrow, so APIs using this are
4043+
// incorrect. Instead, either iterate over all uses and return those with
4044+
// OperandOwnership::EndBorrow or Reborrow.
40414045
using EndBorrowRange =
40424046
decltype(std::declval<ValueBase>().getUsersOfType<EndBorrowInst>());
40434047

0 commit comments

Comments
 (0)