mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #39531 from jckarter/argument-reabstraction-ownership
SILGen: Ensure +1 before reabstracting closure BB args.
This commit is contained in:
@@ -106,9 +106,9 @@ public:
|
||||
argType = argType.getObjectType();
|
||||
}
|
||||
|
||||
if (argType != paramType) {
|
||||
if (argType.getASTType() != paramType.getASTType()) {
|
||||
// Reabstract the value if necessary.
|
||||
mv = SGF.emitOrigToSubstValue(loc, mv, orig, t);
|
||||
mv = SGF.emitOrigToSubstValue(loc, mv.ensurePlusOne(SGF, loc), orig, t);
|
||||
}
|
||||
|
||||
// If the value is a (possibly optional) ObjC block passed into the entry
|
||||
|
||||
Reference in New Issue
Block a user