Move Vending Top-Level Autoclosure discriminators into ASTContext

This bit has historically survived typechecking and parsing across source files.  Stick it where we stick the other global state.

This also means we don't have to thread TopLevelContext around anymore when invoking high-level typechecking entrypoints.
This commit is contained in:
Robert Widmann
2019-11-13 15:23:03 -08:00
parent 0a3a130cfd
commit 88ee618a33
6 changed files with 13 additions and 15 deletions

View File

@@ -277,6 +277,10 @@ public:
/// The # of times we have performed typo correction.
unsigned NumTypoCorrections = 0;
/// The next auto-closure discriminator. This needs to be preserved
/// across invocations of both the parser and the type-checker.
unsigned NextAutoClosureDiscriminator = 0;
private:
/// The current generation number, which reflects the number of
/// times that external modules have been loaded.