Add ModuleFile::isSIB

We can't make the same assumptions about .sib files.

Ideally, we should serialize the module's stage and set WasDeserializedCanonical
based on that state. However, we probably still want the IsSIB flag for
assertions.
This commit is contained in:
Andrew Trick
2018-02-02 14:14:04 -08:00
parent 287ccece75
commit 66a579cc77
3 changed files with 9 additions and 2 deletions

View File

@@ -87,6 +87,11 @@ class ModuleFile
/// The number of entities that are currently being deserialized.
unsigned NumCurrentDeserializingEntities = 0;
/// Is this module file actually a .sib file? .sib files are serialized SIL at
/// arbitrary granularity and arbitrary stage; unlike serialized Swift
/// modules, which are assumed to contain canonical SIL for an entire module.
bool IsSIB = false;
/// RAII class to be used when deserializing an entity.
class DeserializingEntityRAII {
ModuleFile &MF;