Move AST transforms out of the Frontend

Move the playground and debugger transforms out
of the Frontend and into `performTypeChecking`, as
we'd want them to be applied if
`performTypeChecking` was called lazily.
This commit is contained in:
Hamish Knight
2020-04-24 14:23:16 -07:00
parent a1716fe2a6
commit b78f47490a
7 changed files with 49 additions and 51 deletions

View File

@@ -139,10 +139,27 @@ namespace swift {
/// Allow throwing call expressions without annotation with 'try'.
bool EnableThrowWithoutTry = false;
/// If set, inserts instrumentation useful for testing the debugger.
bool DebuggerTestingTransform = false;
/// Indicates whether the AST should be instrumented to simulate a
/// debugger's program counter. Similar to the PlaygroundTransform, this
/// will instrument the AST with function calls that get called when you
/// would see a program counter move in a debugger. To adopt this implement
/// the __builtin_pc_before and __builtin_pc_after functions.
bool PCMacro = false;
/// Enable features useful for running playgrounds.
// FIXME: This should probably be limited to the particular SourceFile.
bool Playground = false;
/// Indicates whether the playground transformation should be applied.
bool PlaygroundTransform = false;
/// Indicates whether the playground transformation should omit
/// instrumentation that has a high runtime performance impact.
bool PlaygroundHighPerformance = false;
/// Keep comments during lexing and attach them to declarations.
bool AttachCommentsToDecls = false;