[AST] Move getEffectiveAccess calls into SIL.

This commit is contained in:
Huon Wilson
2017-06-19 17:46:45 -07:00
parent 3ac4cec148
commit a0bc3bd0b6
9 changed files with 63 additions and 34 deletions

View File

@@ -665,8 +665,10 @@ static bool performCompile(CompilerInstance &Instance,
}
if (Action == FrontendOptions::EmitTBD) {
auto hasMultipleIRGenThreads = Invocation.getSILOptions().NumThreads > 1;
const auto &silOpts = Invocation.getSILOptions();
auto hasMultipleIRGenThreads = silOpts.NumThreads > 1;
return writeTBD(Instance.getMainModule(), hasMultipleIRGenThreads,
silOpts.SILSerializeWitnessTables,
opts.getSingleOutputFilename());
}
@@ -942,14 +944,16 @@ static bool performCompile(CompilerInstance &Instance,
!astGuaranteedToCorrespondToSIL)
break;
auto hasMultipleIRGenThreads = Invocation.getSILOptions().NumThreads > 1;
const auto &silOpts = Invocation.getSILOptions();
auto hasMultipleIRGenThreads = silOpts.NumThreads > 1;
bool error;
if (PrimarySourceFile)
error = validateTBD(PrimarySourceFile, *IRModule, hasMultipleIRGenThreads,
allSymbols);
silOpts.SILSerializeWitnessTables, allSymbols);
else
error = validateTBD(Instance.getMainModule(), *IRModule,
hasMultipleIRGenThreads, allSymbols);
hasMultipleIRGenThreads,
silOpts.SILSerializeWitnessTables, allSymbols);
if (error)
return true;