mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ownership] Change ReturnInst to have its ValueOwnershipKind stored within it rather than always recomputing from the function type.
This allows us to hoist the error case of having a function signature with conflicting ownership requirements into the creation of the return inst instead of at the time of computing Operand Constraints. This is the last part of the Operand Constraint computation that can fail that once removed will let me use fail to mean any constriant is allowed.
This commit is contained in:
@@ -1969,7 +1969,7 @@ public:
|
||||
|
||||
ReturnInst *createReturn(SILLocation Loc, SILValue ReturnValue) {
|
||||
return insertTerminator(new (getModule()) ReturnInst(
|
||||
getSILDebugLocation(Loc), ReturnValue));
|
||||
getFunction(), getSILDebugLocation(Loc), ReturnValue));
|
||||
}
|
||||
|
||||
ThrowInst *createThrow(SILLocation Loc, SILValue errorValue) {
|
||||
|
||||
Reference in New Issue
Block a user