Check that "@testable import Foo" is only used to import testable modules.

(i.e. modules compiled with -enable-testing)

Part of testability (rdar://problem/17732115)

Swift SVN r26293
This commit is contained in:
Jordan Rose
2015-03-19 02:20:41 +00:00
parent c6739b6b6c
commit e6c2131bda
14 changed files with 90 additions and 34 deletions

View File

@@ -334,9 +334,9 @@ void SourceLookupCache::invalidate() {
// Module Implementation
//===----------------------------------------------------------------------===//
Module::Module(Identifier name, ASTContext &ctx, bool testingEnabled)
: DeclContext(DeclContextKind::Module, nullptr), Ctx(ctx), Name(name),
DSOHandleAndTestingEnabled(nullptr, testingEnabled) {
Module::Module(Identifier name, ASTContext &ctx)
: DeclContext(DeclContextKind::Module, nullptr), Ctx(ctx), Name(name)
{
ctx.addDestructorCleanup(*this);
}