Archetype builder: start tracking the locations and reasons for specific requirements.

Whenever we add a requirement, we now know

  (1) Why we added the requirement, e.g., whether it was explicitly written, inferred from a signature, or introduced by an outer scope.
  (2) Where in the source code that requirement originated.

Also add a debugging flag for dumping the archetype builder information, so we can write tests against it.

This is effectively NFC, but it's infrastructure to help a number of requirements-related tasks.

Swift SVN r22638
This commit is contained in:
Doug Gregor
2014-10-09 21:52:28 +00:00
parent afa1ba6f51
commit 91ddaf59eb
7 changed files with 373 additions and 127 deletions

View File

@@ -616,6 +616,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.ImportUnions |= Args.hasArg(OPT_enable_union_import);
Opts.DebugConstraintSolver |= Args.hasArg(OPT_debug_constraints);
Opts.DebugGenericSignatures |= Args.hasArg(OPT_debug_generic_signatures);
Opts.DebuggerSupport |= Args.hasArg(OPT_debugger_support);
Opts.Playground |= Args.hasArg(OPT_playground);