Serialization: Remove obsolete 'HasUnderlyingModule' hack

This commit is contained in:
Slava Pestov
2018-04-26 22:51:29 -07:00
parent 8408f8221d
commit 4d7950a9b2
4 changed files with 1 additions and 30 deletions

View File

@@ -1128,7 +1128,6 @@ ModuleFile::ModuleFile(
}
cursor.EnterSubBlock(INPUT_BLOCK_ID);
bool seenFlags = false;
auto next = cursor.advance();
while (next.Kind == llvm::BitstreamEntry::Record) {
@@ -1169,15 +1168,6 @@ ModuleFile::ModuleFile(
importedHeaderInfo.contents = blobData;
break;
}
case input_block::MODULE_FLAGS: {
assert(!seenFlags && "only one flags record allowed");
seenFlags = true;
bool hasUnderlyingModule;
input_block::ModuleFlagsLayout::readRecord(scratch,
hasUnderlyingModule);
Bits.HasUnderlyingModule = hasUnderlyingModule;
break;
}
case input_block::SEARCH_PATH: {
bool isFramework;
bool isSystem;
@@ -1433,11 +1423,6 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
continue;
}
// This is for backwards-compatibility with modules that still rely on the
// "HasUnderlyingModule" flag.
if (Bits.HasUnderlyingModule && module == ShadowedModule)
dependency.forceExported();
if (scopePath.empty()) {
dependency.Import = { {}, module };
} else {