Kill [stdlib] attribute.

Now that we have true serialized modules, the standard library can import
the Builtin module without any special direction (beyond -parse-stdlib),
and anyone can include those modules without special direction.

Swift SVN r6752
This commit is contained in:
Jordan Rose
2013-07-30 21:27:42 +00:00
parent 21785c8a36
commit 3e7eef56e7
17 changed files with 28 additions and 77 deletions

View File

@@ -74,8 +74,7 @@ static llvm::error_code findModule(ASTContext &ctx, StringRef moduleID,
Module *SourceLoader::loadModule(SourceLoc importLoc,
ArrayRef<std::pair<Identifier, SourceLoc>> path,
bool isStdlibImport) {
ArrayRef<std::pair<Identifier, SourceLoc>> path) {
// FIXME: Swift submodules?
if (path.size() > 1)
return nullptr;
@@ -106,11 +105,6 @@ Module *SourceLoader::loadModule(SourceLoc importLoc,
auto *importTU = new (Ctx) TranslationUnit(moduleID.first, comp, Ctx,
TranslationUnit::Library);
Ctx.LoadedModules[moduleID.first.str()] = importTU;
// FIXME: This is a terrible hack for the standard library. It should come
// from metadata about the imported module.
importTU->HasBuiltinModuleAccess = moduleID.first.str() == "swift" ||
isStdlibImport;
performAutoImport(importTU);