Don't type-check imported decls unless referenced in the source file.

Instead, pass a LazyResolver down through name lookup, and type-check
things on demand. Most of the churn here is simply passing that extra
LazyResolver parameter through.

This doesn't actually work yet; the later commits will fix this.

Swift SVN r8643
This commit is contained in:
Jordan Rose
2013-09-25 20:08:14 +00:00
parent 38ce790bae
commit 15bfc8db2b
31 changed files with 265 additions and 124 deletions

View File

@@ -117,6 +117,9 @@ static SILDeclRef getBridgingFn(Optional<SILDeclRef> &cacheSlot,
moduleName, functionName);
exit(1);
}
assert(fd->hasType() && "bridging functions must be type-checked");
// Check that the function takes the expected arguments and returns the
// expected result type.
SILDeclRef c(fd);