[NFC] replace canBeNoncopyable

First, "can have an absence of Copyable" is a rather confusing notion,
so the query is flipped to "can be Copyable". Next, it's more robust to
ask if a conformance exists for the TypeDecl to answer that question,
rather than trying to replicate what happens within that conformance
lookup.

Also renames `TypeDecl::isEscapable` to match.
This commit is contained in:
Kavon Farvardin
2024-01-14 15:30:41 -08:00
parent 483b569bc8
commit b4985f7fde
23 changed files with 145 additions and 66 deletions

View File

@@ -680,7 +680,7 @@ lookUpFunctionInVTable(ClassDecl *Class, SILDeclRef Member) {
SILFunction *
SILModule::lookUpMoveOnlyDeinitFunction(const NominalTypeDecl *nomDecl) {
assert(nomDecl->canBeNoncopyable());
assert(!nomDecl->canBeCopyable());
auto *tbl = lookUpMoveOnlyDeinit(nomDecl);