mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user