mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Basic implementation of lookupVisibleDecls() for serialized modules.
This involved threading it through ModuleLoader, as with all the other module-generic callbacks. I plan to collapse a bit of the chaining, but unfortunately not that much. This brings back the CodeCompletion tests. Swift SVN r6527
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "ModuleFormat.h"
|
||||
#include "swift/AST/AST.h"
|
||||
#include "swift/AST/ModuleLoader.h"
|
||||
#include "swift/AST/NameLookup.h"
|
||||
#include "swift/Basic/STLExtras.h"
|
||||
#include "swift/Serialization/BCReadingExtras.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
@@ -2213,3 +2214,13 @@ void ModuleFile::getReexportedModules(
|
||||
results.push_back({Module::AccessPathTy(), dep.Mod});
|
||||
}
|
||||
|
||||
void ModuleFile::lookupVisibleDecls(Module::AccessPathTy accessPath,
|
||||
VisibleDeclConsumer &consumer,
|
||||
NLKind lookupKind) {
|
||||
// FIXME: Validate against access path.
|
||||
for (auto &topLevelEntry : TopLevelDecls) {
|
||||
for (auto &value : topLevelEntry.second)
|
||||
consumer.foundDecl(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user