mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[nfc] rename or eliminate isPureMoveOnly APIs
I think from SIL's perspective, it should only worry about whether the type is move-only. That includes MoveOnlyWrapped SILTypes and regular types that cannot be copied. Most of the code querying `SILType::isPureMoveOnly` is in SILGen, where it's very likely that the original AST type is sitting around already. In such cases, I think it's fine to ask the AST type if it is noncopyable. The clarity of only asking the ASTType if it's noncopyable is beneficial, I think.
This commit is contained in:
@@ -379,7 +379,7 @@ public:
|
||||
// analysis assumes memory is deinitialized on all paths, which is not the
|
||||
// case for discarded values. Eventually copyable types may also be
|
||||
// discarded; to support that, we will leave a drop_deinit_addr in place.
|
||||
if (ASI->getType().isPureMoveOnly()) {
|
||||
if (ASI->getType().getASTType()->isNoncopyable()) {
|
||||
LegalUsers = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user