mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Enable enforce-exclusivity=checked at -Onone.
This enables dynamic checking at -Onone. Static checking is enabled by default regardless of optimizations. SILGen only emits dynamic markers at -Onone, or when explicitly requested with -enforce-exclusivity=checked|dynamic. All access markers are stripped at the start of the optimization pipeline regardless of optimization level or command line flags.
This commit is contained in:
@@ -1414,6 +1414,8 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
IRGenOpts.Sanitize = Opts.Sanitize;
|
||||
}
|
||||
|
||||
if (Opts.Optimization > SILOptions::SILOptMode::None)
|
||||
Opts.EnforceExclusivityDynamic = false;
|
||||
if (const Arg *A = Args.getLastArg(options::OPT_enforce_exclusivity_EQ)) {
|
||||
parseExclusivityEnforcementOptions(A, Opts, Diags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user