[Serialization] Remove duplicated IsSIB bit

Store the bit on the ModuleFile, and query it
from the SerializedASTFile.
This commit is contained in:
Hamish Knight
2020-04-30 14:17:23 -07:00
parent 89a3d663b5
commit b6150b06b3
2 changed files with 9 additions and 7 deletions

View File

@@ -677,8 +677,7 @@ FileUnit *SerializedModuleLoaderBase::loadAST(
M.setResilienceStrategy(extendedInfo.getResilienceStrategy());
// We've loaded the file. Now try to bring it into the AST.
auto fileUnit = new (Ctx) SerializedASTFile(M, *loadedModuleFile,
extendedInfo.isSIB());
auto fileUnit = new (Ctx) SerializedASTFile(M, *loadedModuleFile);
M.addFile(*fileUnit);
if (extendedInfo.isTestable())
M.setTestingEnabled();
@@ -1100,6 +1099,10 @@ void SerializedASTFile::collectLinkLibraries(
}
}
bool SerializedASTFile::isSIB() const {
return File.IsSIB;
}
bool SerializedASTFile::isSystemModule() const {
if (auto Mod = File.getUnderlyingModule()) {
return Mod->isSystemModule();