mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix BorrowingOperand::visitScopeEndingUses() invariants.
This API only makes sense for a scoped borrow-introducer such as: - reborrow - owned mark_dependence Borrowing operands that forward guaranteed values do not have scope-ending uses.
This commit is contained in:
@@ -8815,10 +8815,14 @@ public:
|
||||
uint8_t(MarkDependenceKind::Escaping);
|
||||
}
|
||||
|
||||
/// Visit the instructions that end the lifetime of an OSSA on-stack closure.
|
||||
/// Visit the instructions that end the lifetime the dependent value.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - isNonEscaping()
|
||||
/// - Produces an owned, Escapable, non-address value
|
||||
bool visitNonEscapingLifetimeEnds(
|
||||
llvm::function_ref<bool (Operand*)> visitScopeEnd,
|
||||
llvm::function_ref<bool (Operand*)> visitUnknownUse) const;
|
||||
llvm::function_ref<bool (Operand*)> visitUnknownUse);
|
||||
};
|
||||
|
||||
/// Promote an Objective-C block that is on the stack to the heap, or simply
|
||||
|
||||
Reference in New Issue
Block a user