Commit Graph

3 Commits

Author SHA1 Message Date
Doug Gregor
643ce71a09 Peer into the types of declarations to find async/actors/etc. 2021-02-08 22:50:48 -08:00
Doug Gregor
627e4f03a3 Properly print protocols that inherit marker protocols under $MarkerProtocol 2021-02-08 22:37:13 -08:00
Doug Gregor
aa139a101c [Module interface] Use features in module interface generation.
When generating a module interface, emit `#if` around any declarations
that are tied to specific, named language features. This allows module
interfaces to be processed by older Swift compilers that do not
support these newer features, such as async/await or actors.

The amount of effort required to correctly handle a new kind of
feature varies somewhat drastically based on the feature itself. The
"simple" case is where a particular declaration can only exist if a
feature is available. For example, and `async` declaration is fairly
easy to handle; a `@_marker` protocol's conformances are not.

Fixes rdar://73326633.
2021-02-08 16:01:39 -08:00