Merge pull request #70866 from kavon/ncgenerics-stdlib-building-v4

Build Stdlib with Noncopyable Generics (Part 4)
This commit is contained in:
Kavon Farvardin
2024-01-25 07:09:38 -08:00
committed by GitHub
84 changed files with 802 additions and 279 deletions

View File

@@ -1753,9 +1753,10 @@ SwiftDeclSynthesizer::makeDereferencedPointeeProperty(FuncDecl *getter,
: rawElementTy;
// Use 'address' or 'mutableAddress' accessors for non-copyable
// types that are returned indirectly.
bool isImplicit = !elementTy->isNoncopyable(dc);
bool isNoncopyable = dc->mapTypeIntoContext(elementTy)->isNoncopyable();
bool isImplicit = !isNoncopyable;
bool useAddress =
rawElementTy->getAnyPointerElementType() && elementTy->isNoncopyable(dc);
rawElementTy->getAnyPointerElementType() && isNoncopyable;
auto result = new (ctx)
VarDecl(/*isStatic*/ false, VarDecl::Introducer::Var,