mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[GSB] Add verification of all generic signatures within a module.
Add a verification pass to ensure that all of the generic signatures in a module are both minimal and canonical. The approach taken is quite direct: for every (canonical) generic signature in the module, try removing a single requirement and forming a new generic signature from the result. If that new generic signature that provide the removed requirement, then the original signature was not minimal. Also canonicalize each resulting signature, to ensure that it meets the requirements for a canonical signature. Add a test to ensure that all of the generic signatures in the Swift module are minimal and canonical, since they are ABI.
This commit is contained in:
@@ -229,6 +229,10 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.ParseStdlib |= Args.hasArg(OPT_parse_stdlib);
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_verify_generic_signatures)) {
|
||||
Opts.VerifyGenericSignaturesInModule = A->getValue();
|
||||
}
|
||||
|
||||
// Determine what the user has asked the frontend to do.
|
||||
FrontendOptions::ActionType &Action = Opts.RequestedAction;
|
||||
if (const Arg *A = Args.getLastArg(OPT_modes_Group)) {
|
||||
|
||||
Reference in New Issue
Block a user