Invoke TryAddFinal after type checking.

Run whole-module checks at the end of perform Sema, specifically
TryAddFinal. After everything has been type checked, accessibility has
been provided, and we have had a chance to see any potential
overrides, we try to add the final attribute to class members.

This ends up de-virtualizing many functions, or rather they avoid the
vtable altogether. Thus, there are many test file changes. New test
file add_final.swift. Other tests updated to either reflect the
non-virtual call, or to have public added to them.

Swift SVN r20338
This commit is contained in:
Michael Ilseman
2014-07-22 21:31:58 +00:00
parent bd21ef4c88
commit 41dec5b58c
31 changed files with 302 additions and 172 deletions

View File

@@ -437,6 +437,8 @@ void CompilerInstance::performSema() {
performDelayedParsing(MainModule, PersistentState,
Invocation.getCodeCompletionFactory());
}
performWholeModuleChecks(MainModule, PrimaryBufferID == NO_SUCH_BUFFER);
}
void CompilerInstance::performParseOnly() {