mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Hook up basic name lookup for imported modules.
Also, explicitly list the top-level decls in a module. Eventually this will be a proper lazily-loaded identifier-DeclID map, but for now it's just a flat list of IDs to deserialize as soon as a lookup is requested. We can now parse and typecheck a file that imports typealiases of builtin types. Swift SVN r5325
This commit is contained in:
@@ -182,6 +182,22 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
|
||||
return module;
|
||||
}
|
||||
|
||||
void SerializedModuleLoader::lookupValue(Module *module,
|
||||
Module::AccessPathTy accessPath,
|
||||
Identifier name, NLKind lookupKind,
|
||||
SmallVectorImpl<ValueDecl*> &results) {
|
||||
// FIXME: handle nested modules.
|
||||
if (!accessPath.empty())
|
||||
return;
|
||||
|
||||
ModuleFile *moduleFile = cast<SerializedModule>(module)->File;
|
||||
if (!moduleFile)
|
||||
return;
|
||||
|
||||
moduleFile->lookupValue(name, results);
|
||||
}
|
||||
|
||||
|
||||
void SerializedModuleLoader::loadExtensions(NominalTypeDecl *nominal,
|
||||
unsigned previousGeneration) {
|
||||
// FIXME: Look for extensions of the given nominal type within the
|
||||
|
||||
Reference in New Issue
Block a user