mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rework the assign instruction in two major ways:
1. Change assign to follow SILGen's model for a semantic assignment, which (in the case of unowned pointers) doesn't require the left and right hand sides to be the same. 2. Change assign to consume/take the refcount from the LHS, following SILGen's design (which I completely misunderstood before). Swift SVN r7787
This commit is contained in:
@@ -616,6 +616,10 @@ public:
|
||||
SILValue getSrc() const { return Operands[Src].get(); }
|
||||
SILValue getDest() const { return Operands[Dest].get(); }
|
||||
|
||||
bool isUnownedAssign() const {
|
||||
return getDest().getType().getObjectType().is<UnownedStorageType>();
|
||||
}
|
||||
|
||||
ArrayRef<Operand> getAllOperands() const { return Operands.asArray(); }
|
||||
MutableArrayRef<Operand> getAllOperands() { return Operands.asArray(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user