IRGen: Start a type verifier to fuzz static type info against runtime type info.

We've had a rash of bugs due to inconsistencies between how IRGen and the runtime think types are laid out. Add a '-verify-type-layout' mode to the frontend that causes IRGen to emit a bunch of code that compares its static assumptions against what the runtime value witness does.

Swift SVN r24918
This commit is contained in:
Joe Groff
2015-02-03 16:47:25 +00:00
parent f49ab3f697
commit 8e1e6665a7
13 changed files with 361 additions and 2 deletions

View File

@@ -932,6 +932,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
if (Args.hasArg(OPT_use_jit))
Opts.UseJIT = true;
if (Args.hasArg(OPT_verify_type_layout))
Opts.VerifyTypeLayout = true;
return false;
}