Expose the ModuleFile in SerializedASTFile so that the underlying Module (and thus SILModule) can be retrieved when deserializing.

This is necessary since if one wishes to write a secondary tool with swift
headers, one can not access the ModuleFile in SerializedASTFile since to do so
would require you to be a friend of the class, something that would create a
build dependency in between the secondary tool and the swift libraries.

Swift SVN r14171
This commit is contained in:
Michael Gottesman
2014-02-20 21:28:45 +00:00
parent 7f4f25d186
commit 1a2ac51948

View File

@@ -142,6 +142,8 @@ class SerializedASTFile final : public LoadedFile {
: LoadedFile(FileUnitKind::SerializedAST, M), File(file) {}
public:
ModuleFile &getFile() { return File; }
virtual void lookupValue(Module::AccessPathTy accessPath,
Identifier name, NLKind lookupKind,
SmallVectorImpl<ValueDecl*> &results) const override;