Revert "Merge pull request #16211 from slavapestov/fix-inlinable-vs-autolinking"

This reverts commit bb16ee049d,
reversing changes made to a8d831f5f5.
It's not sufficient to solve the problem, and the choices were to do
something more complicated, or just take a simple brute force
approach. We're going with the latter.
This commit is contained in:
Jordan Rose
2018-05-03 10:30:33 -07:00
parent e432971a1a
commit 4714fcd50c
21 changed files with 26 additions and 196 deletions

View File

@@ -1140,12 +1140,10 @@ ModuleFile::ModuleFile(
unsigned kind = cursor.readRecord(next.ID, scratch, &blobData);
switch (kind) {
case input_block::IMPORTED_MODULE: {
bool exported, usableFromInline, scoped;
bool exported, scoped;
input_block::ImportedModuleLayout::readRecord(scratch,
exported,
usableFromInline,
scoped);
Dependencies.push_back({blobData, exported, usableFromInline, scoped});
exported, scoped);
Dependencies.push_back({blobData, exported, scoped});
break;
}
case input_block::LINK_LIBRARY: {
@@ -1607,13 +1605,6 @@ void ModuleFile::getImportedModules(
continue;
break;
case ModuleDecl::ImportFilter::ForLinking:
// Only include @_exported and @usableFromInline imports.
if (!dep.isExported() && !dep.isUsableFromInline())
continue;
break;
}
assert(dep.isLoaded());
@@ -1682,9 +1673,6 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
if (Dep.isExported())
ID->getAttrs().add(
new (Ctx) ExportedAttr(/*IsImplicit=*/false));
if (Dep.isUsableFromInline())
ID->getAttrs().add(
new (Ctx) UsableFromInlineImportAttr(/*IsImplicit=*/true));
ImportDecls.push_back(ID);
}
Bits.ComputedImportDecls = true;