Files
swift-mirror/lib/SIL/AbstractionPattern.cpp
John McCall e312f8ef4a Add an option to get the native abstraction pattern of a storage decl.
For the most part, code should be working with the as-declared
abstraction pattern of the storage, because that's the pattern
produced by its accessors.  However, in the special case of an
accessor synthesized on demand to satisfy a protocol conformance,
that accessor will use the native abstraction pattern of the
declaration, and so the witness thunk that uses that accessor
must use that pattern when generating its access.

This doesn't matter today because the only on-demand synthesized
accessor is materializeForSet, and witnesses for materializeForSet
don't actually call the synthetic materializeForSet --- in fact,
nothing does.  But the modify accessor uses the otherwise-standard
pattern where the witness modify calls the concrete modify, and
that modify currently uses the native abstraction pattern.
2018-08-27 02:14:21 -04:00

41 KiB