mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Create two versions (for caller and callee) of the functions that answer questions about parameter convention (#74124)
Create two versions of the following functions: isConsumedParameter isGuaranteedParameter SILParameterInfo::isConsumed SILParameterInfo::isGuaranteed SILArgumentConvention::isOwnedConvention SILArgumentConvention::isGuaranteedConvention These changes will be needed when we add a new convention for non-trivial C++ types as the functions will return different answers depending on whether they are called for the caller or the callee. This commit doesn't change any functionality.
This commit is contained in:
@@ -143,7 +143,8 @@ void GenericCloner::populateCloned() {
|
||||
// Store the new direct parameter to an alloc_stack.
|
||||
createAllocStack();
|
||||
SILValue addr;
|
||||
if (NewArg->getArgumentConvention().isGuaranteedConvention() &&
|
||||
if (NewArg->getArgumentConvention()
|
||||
.isGuaranteedConventionInCallee() &&
|
||||
NewArg->getFunction()->hasOwnership()) {
|
||||
auto *sbi = getBuilder().createStoreBorrow(Loc, NewArg, ASI);
|
||||
StoreBorrowsToCleanup.push_back(sbi);
|
||||
|
||||
Reference in New Issue
Block a user