mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[semantic-sil] Update FunctionSignatureOpts to propagate forward the correct ValueOwnershipKind into FunctionSignatureOpts.
rdar://29791263
This commit is contained in:
@@ -125,6 +125,17 @@ struct ArgumentDescriptor {
|
||||
size_t explosionSize = ProjTree.liveLeafCount();
|
||||
return explosionSize >= 1 && explosionSize <= 3;
|
||||
}
|
||||
|
||||
llvm::Optional<ValueOwnershipKind>
|
||||
getTransformedOwnershipKind(SILType SubTy) {
|
||||
if (IsEntirelyDead)
|
||||
return None;
|
||||
if (SubTy.isTrivial(Arg->getModule()))
|
||||
return Optional<ValueOwnershipKind>(ValueOwnershipKind::Trivial);
|
||||
if (OwnedToGuaranteed)
|
||||
return Optional<ValueOwnershipKind>(ValueOwnershipKind::Guaranteed);
|
||||
return Arg->getOwnershipKind();
|
||||
}
|
||||
};
|
||||
|
||||
/// A structure that maintains all of the information about a specific
|
||||
|
||||
Reference in New Issue
Block a user