[InterfaceGen] Print property initializers in resilient, fixed-layout types (#19619)

Augment the ASTPrinter to print the name and text of initializer expressions if
a property has an initializer and the type is @_fixed_layout and resides in a resilient module, and serialize the text for partial modules.

With this change, all .swiftinterface files in the project (except for SwiftLang) compile to swiftmodules on macOS.

rdar://43774580
rdar://43812188
This commit is contained in:
Harlan
2018-10-05 18:21:46 -07:00
committed by GitHub
parent 690c6c374f
commit 2c86e3249c
10 changed files with 262 additions and 59 deletions

View File

@@ -887,6 +887,9 @@ public:
/// Reads inlinable body text from \c DeclTypeCursor, if present.
Optional<StringRef> maybeReadInlinableBodyText();
/// Reads pattern initializer text from \c DeclTypeCursor, if present.
Optional<StringRef> maybeReadPatternInitializerText();
};
template <typename T, typename RawData>