[serialization] Add a trivial Swift module loader.

Currently, the Swift module loader just looks for a .sm file, verifies the
signature "SMod", and produces an empty DeclContext.

Swift SVN r5126
This commit is contained in:
Jordan Rose
2013-05-09 20:49:29 +00:00
parent d7783030e8
commit 73b6269484
8 changed files with 205 additions and 7 deletions

View File

@@ -300,7 +300,7 @@ public:
class LoadedModule : public Module {
ModuleLoader &Owner;
public:
protected:
LoadedModule(DeclContextKind kind, Identifier name, Component *comp,
ASTContext &ctx, ModuleLoader &owner)
: Module(kind, name, comp, ctx), Owner(owner) {
@@ -308,6 +308,7 @@ public:
ASTStage = TypeChecked;
}
public:
// Inherited from Module.
void lookupValue(AccessPathTy accessPath, Identifier name, NLKind lookupKind,
SmallVectorImpl<ValueDecl*> &result);