mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add TermInst::forwardedOperand. Add SILArgument::forwardedTerminatorResultOperand. This API will be moved into a proper TerminatorResult abstraction. Remove getSingleTerminatorOperand, which could be misused because it's not necessarilly forwarding ownership. Remove the isTransformationTerminator API, which is not useful or well defined. Rewrite several instances of complex logic to handle block arguments with the simple terminator result API. This defines away potential bugs where we don't detect casts that perform implicit conversion. Replace uses of the SILPhiArgument type and code that explicitly handle block arguments. Control flow is irrelevant in these situations. SILPhiArgument needs to be deleted ASAP. Instead, use simple APIs like SILArgument::isTerminatorResult(). Eventually this will be replaced by a TerminatorResult type.
76 KiB
76 KiB