Add @_private(from: "SourceFile.swift") imports

A module compiled with `-enable-private-imports` allows other modules to
import private declarations if the importing source file uses an
``@_private(from: "SourceFile.swift") import statement.

rdar://29318654
This commit is contained in:
Arnold Schwaighofer
2018-11-08 07:57:22 -08:00
parent a952514c5f
commit 963c64e3e7
33 changed files with 605 additions and 47 deletions

View File

@@ -304,6 +304,8 @@ FileUnit *SerializedModuleLoaderBase::loadAST(
M.addFile(*fileUnit);
if (extendedInfo.isTestable())
M.setTestingEnabled();
if (extendedInfo.arePrivateImportsEnabled())
M.setPrivateImportsEnabled();
auto diagLocOrInvalid = diagLoc.getValueOr(SourceLoc());
loadInfo.status =