mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #61304 from nate-chandler/transfer-sil-function-argument-attrs
[SILOptimizer] Preserve arg attrs at cloning.
This commit is contained in:
@@ -123,8 +123,10 @@ void SILBasicBlock::cloneArgumentList(SILBasicBlock *Other) {
|
||||
if (isEntry()) {
|
||||
assert(args_empty() && "Expected to have no arguments");
|
||||
for (auto *FuncArg : Other->getSILFunctionArguments()) {
|
||||
createFunctionArgument(FuncArg->getType(),
|
||||
FuncArg->getDecl());
|
||||
auto *NewArg =
|
||||
createFunctionArgument(FuncArg->getType(), FuncArg->getDecl());
|
||||
NewArg->setNoImplicitCopy(FuncArg->isNoImplicitCopy());
|
||||
NewArg->setLifetimeAnnotation(FuncArg->getLifetimeAnnotation());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user