mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #20855 from gottesmm/pr-94ee6e6c6e2d268f47f17dead77e4feb169c24e6
[ownership] Replace ValueOwnershipKind::Trivial with ValueOwnershipKi…
This commit is contained in:
@@ -165,7 +165,7 @@ SILFunctionArgument *SILBasicBlock::replaceFunctionArgument(
|
||||
assert(isEntry() && "Function Arguments can only be in the entry block");
|
||||
SILModule &M = getParent()->getModule();
|
||||
if (Ty.isTrivial(M))
|
||||
Kind = ValueOwnershipKind::Trivial;
|
||||
Kind = ValueOwnershipKind::Any;
|
||||
|
||||
assert(ArgumentList[i]->use_empty() && "Expected no uses of the old arg!");
|
||||
|
||||
@@ -190,7 +190,7 @@ SILPhiArgument *SILBasicBlock::replacePhiArgument(unsigned i, SILType Ty,
|
||||
assert(!isEntry() && "PHI Arguments can not be in the entry block");
|
||||
SILModule &M = getParent()->getModule();
|
||||
if (Ty.isTrivial(M))
|
||||
Kind = ValueOwnershipKind::Trivial;
|
||||
Kind = ValueOwnershipKind::Any;
|
||||
|
||||
assert(ArgumentList[i]->use_empty() && "Expected no uses of the old BB arg!");
|
||||
|
||||
@@ -211,10 +211,8 @@ SILPhiArgument *SILBasicBlock::createPhiArgument(SILType Ty,
|
||||
ValueOwnershipKind Kind,
|
||||
const ValueDecl *D) {
|
||||
assert(!isEntry() && "PHI Arguments can not be in the entry block");
|
||||
assert(!getParent()->hasQualifiedOwnership() ||
|
||||
Kind != ValueOwnershipKind::Any);
|
||||
if (Ty.isTrivial(getModule()))
|
||||
Kind = ValueOwnershipKind::Trivial;
|
||||
Kind = ValueOwnershipKind::Any;
|
||||
return new (getModule()) SILPhiArgument(this, Ty, Kind, D);
|
||||
}
|
||||
|
||||
@@ -222,10 +220,8 @@ SILPhiArgument *SILBasicBlock::insertPhiArgument(arg_iterator Iter, SILType Ty,
|
||||
ValueOwnershipKind Kind,
|
||||
const ValueDecl *D) {
|
||||
assert(!isEntry() && "PHI Arguments can not be in the entry block");
|
||||
assert(!getParent()->hasQualifiedOwnership() ||
|
||||
Kind != ValueOwnershipKind::Any);
|
||||
if (Ty.isTrivial(getModule()))
|
||||
Kind = ValueOwnershipKind::Trivial;
|
||||
Kind = ValueOwnershipKind::Any;
|
||||
return new (getModule()) SILPhiArgument(this, Iter, Ty, Kind, D);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user