mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use a list of module loaders instead of a single Clang importer.
This paves the way for having a Swift module importer. The eventual goal here is to eliminate all explicit uses of the Clang module loader, but I'm not going to push too hard on that for now. Swift SVN r5092
This commit is contained in:
@@ -234,7 +234,8 @@ ArrayRef<ExtensionDecl*> Module::lookupExtensions(Type T) {
|
||||
return Cache.getExtensions(T->getCanonicalType());
|
||||
}
|
||||
|
||||
return Ctx.getModuleLoader().lookupExtensions(cast<ClangModule>(this), T);
|
||||
assert(isa<ClangModule>(this));
|
||||
return Ctx.getClangModuleLoader()->lookupExtensions(this, T);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -260,8 +261,9 @@ void Module::lookupValue(AccessPathTy AccessPath, Identifier Name,
|
||||
.lookupValue(AccessPath, Name, LookupKind, *TU, Result);
|
||||
}
|
||||
|
||||
return Ctx.getModuleLoader().lookupValue(cast<ClangModule>(this), AccessPath,
|
||||
Name, LookupKind, Result);
|
||||
assert(isa<ClangModule>(this));
|
||||
return Ctx.getClangModuleLoader()->lookupValue(this, AccessPath,
|
||||
Name, LookupKind, Result);
|
||||
}
|
||||
|
||||
/// lookupVisibleDecls - Find ValueDecls in the module and pass them to the
|
||||
|
||||
Reference in New Issue
Block a user