Special-case the standard library to always live relative to the compiler.

Import "swift" will now only find "swift.swiftmodule", and only in the
runtime import path.

<rdar://problem/15898866>

Swift SVN r12932
This commit is contained in:
Jordan Rose
2014-01-24 20:10:26 +00:00
parent 35d1f4aa1c
commit 4844f22475
11 changed files with 95 additions and 79 deletions

View File

@@ -65,18 +65,10 @@ public:
SerializedModuleLoader &operator=(const SerializedModuleLoader &) = delete;
SerializedModuleLoader &operator=(SerializedModuleLoader &&) = delete;
/// \brief Import a module with the given module path.
///
/// \param importLoc The location of the 'import' keyword.
///
/// \param path A sequence of (identifier, location) pairs that denote
/// the dotted module name to load, e.g., AppKit.NSWindow.
///
/// \returns the module referenced, if it could be loaded. Otherwise,
/// emits a diagnostic and returns a FailedImportModule object.
virtual Module *
loadModule(SourceLoc importLoc,
ArrayRef<std::pair<Identifier, SourceLoc>> path) override;
ArrayRef<std::pair<Identifier, SourceLoc>> path,
bool isStdlib) override;
/// Attempt to load a serialized AST into the given module.
///