Reuse "LookupCache" pointer for a LoadedModule’s owner.

Minor size optimization. No functionality change.

Swift SVN r6521
This commit is contained in:
Jordan Rose
2013-07-23 23:10:11 +00:00
parent 3e606010ee
commit f12f3c29ac
2 changed files with 6 additions and 5 deletions

View File

@@ -305,14 +305,13 @@ public:
///
/// This may be a Swift module or a Clang module.
class LoadedModule : public Module {
ModuleLoader &Owner;
protected:
LoadedModule(DeclContextKind kind, Identifier name, Component *comp,
ASTContext &ctx, ModuleLoader &owner)
: Module(kind, name, comp, ctx), Owner(owner) {
: Module(kind, name, comp, ctx) {
// Loaded modules are always well-formed.
ASTStage = TypeChecked;
LookupCachePimpl = static_cast<void *>(&owner);
}
public: