mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
implement support for a new [stdlib] attribute that can be slapped on an import decl.
This causes the SourceLoader to recursively parse the imported module in standard library mode, giving it access to the Builtin module. This is all a terrible hack and should be ripped out with great victory someday, but until we have binary modules that persist the build setting used to produce the module, this is the best we can do. Swift SVN r5847
This commit is contained in:
@@ -559,7 +559,7 @@ Decl *ModuleFile::getDecl(DeclID DID, DeclDeserializationOptions opts) {
|
||||
Identifier moduleName = getIdentifier(rawAccessPath.front());
|
||||
rawAccessPath = rawAccessPath.slice(1);
|
||||
// FIXME: provide a real source location.
|
||||
Module *M = ctx.getModule(std::make_pair(moduleName, SourceLoc()));
|
||||
Module *M = ctx.getModule(std::make_pair(moduleName, SourceLoc()), false);
|
||||
assert(M && "missing dependency");
|
||||
|
||||
switch (kind) {
|
||||
@@ -1051,7 +1051,7 @@ bool ModuleFile::associateWithModule(Module *module) {
|
||||
assert(!dependency.Mod && "already loaded?");
|
||||
Identifier ID = ctx.getIdentifier(dependency.Name);
|
||||
// FIXME: Provide a proper source location.
|
||||
dependency.Mod = ctx.getModule(std::make_pair(ID, SourceLoc()));
|
||||
dependency.Mod = ctx.getModule(std::make_pair(ID, SourceLoc()), false);
|
||||
if (!dependency.Mod)
|
||||
missingDependency = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user