Summon the eldritch horror "EagerDeserializationDecls" from the bowels of history.

Adding explicit constructors to Clang-imported structs in the previous commits exposes a latent phase ordering issue between the Clang importer and SIL deserialization. Deserializing the standard library SIL ends up pulling in additional Clang decls which never get type-checked before we attempt to emit their code. Work around this by bringing back the "EagerDeserializedDecls" block in the serialization format, and adding any cross-referenced decls that get referenced in SILSerializeAll mode to it, so that we ensure they're available before SILGen. We also have to type-check external decls after doing so, since when only importing a module, we wouldn't do any type-checking at all otherwise.

Swift SVN r23728
This commit is contained in:
Joe Groff
2014-12-05 05:31:25 +00:00
parent e6d97e8de7
commit df53d4bd80
8 changed files with 1022 additions and 11 deletions

View File

@@ -41,6 +41,7 @@ namespace swift {
class DelayedParsingCallbacks;
class DiagnosticConsumer;
class DiagnosticEngine;
class FileUnit;
class GenericParamList;
class IRGenOptions;
class LangOptions;
@@ -155,7 +156,7 @@ namespace swift {
void performWholeModuleTypeChecking(SourceFile &SF);
/// Incrementally type-check only added external definitions.
void typeCheckExternalDefinitions(SourceFile &SF);
void typeCheckExternalDefinitions(FileUnit &FU);
/// \brief Recursively validate the specified type.
///