This has the effect of propagating the search path to the clang importer as '-iframework'.
It doesn't affect whether a swift module is treated as system or not, this can be done as follow-up enhancement.
- Don't allow @_inlineable on stored properties; this generates
invalid SIL since clients can't know about stored properties of
resilient types. Accessors for stored properties of non-resilient
types are already @_inlineable anyway.
- Don't allow @_inlineable on declarations that are not public or
@_versioned, since it's simply redundant.
Make the addSubstitution() and addConformance() methods private,
and declare GenericEnvironment and GenericSignature as friends of
SubstitutionMap.
At some point in the future, we can switch to a more efficient
representation of SubstitutionMap, where instead of storing
multiple hashtables, we store arrays; the keys are pre-determined.
This essentially undoes the implementation in 51da51dfc0, which
implicitly did a substitution of the Self type in a protocol's
requirement signature by threading around the replacement PA. This is
brittle because every part of the code needs to take and pass around the
argument. By preemptively substituting, the whole requirement is in the
right form from the time it enters `addRequirement`.
The infrastructure here also allows simplifying some code.
Remove the pre-expansion of all of the archetypes in a generic
environment; they can be constructed lazily from interface types.
Note that this only concerns the construction of the archetypes
themselves. The archetype builder is still pre-expanding all
*potential* archetypes.
"Fixes" rdar://problem/30351514, in the sense that the eager code and
the assertion that was getting tripped up are being eliminated
completely.
This just moves a bunch of queries that used information on SILFunction to
determine this property to just call a helper on SILFunctionType itself.
Centralized logic is good.
rdar://29791263
If the nested type itself has generic constraints, we would
hit an assertion in requirement inference. Refactor some code
so that we can make the assertion more accurate.
Fixes <rdar://problem/30353095>.
This caused a crasher when running the ownership verifier. I don't have a test
case right now, since it happened several weeks ago.
The bug can not happen again since I eliminated the nullptr default argument.
rdar://29791263
Previously, these were only diagnosed in some situations, but the
compiler is becoming more flexible about when things get fed into
different places, and so can crop up elsewhere.
The correct/canonical ConcreteType and ConcreteTypeSource are both
stored in the Representative, but previously only the getter for the
former was tranversing the chain.
This biggest change is:
- LayoutConstraintInfo is now a FoldingSetNode, which allows for proper canonicalization of LayoutConstraints. This is important for the correctness of type comparisons if types contain layout constraints.
No functionality changes from the client's point of view.
New generic environments should be created directly from the generic
signature, without having to explicitly create an archetype
builder. Now, only the canonical archetype builders are ever used to
create a generic environment.