mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[semantic-arc] Add the -enable-sil-ownership flag and propagate its value to SILOptions.EnableSILOwnershipModel.
This will allow for semantic arc work to remain behind a flag and not affect other in tree developers. More importantly it enables for bots to be setup with this flag enabled. rdar://28685236
This commit is contained in:
@@ -113,6 +113,9 @@ public:
|
||||
|
||||
/// The name of the SIL outputfile if compiled with SIL debugging (-gsil).
|
||||
std::string SILOutputFileNameForDebugging;
|
||||
|
||||
/// If set to true, compile with the SIL Ownership Model enabled.
|
||||
bool EnableSILOwnership = false;
|
||||
};
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
@@ -227,6 +227,9 @@ def dump_clang_diagnostics : Flag<["-"], "dump-clang-diagnostics">,
|
||||
def emit_verbose_sil : Flag<["-"], "emit-verbose-sil">,
|
||||
HelpText<"Emit locations during SIL emission">;
|
||||
|
||||
def enable_sil_ownership : Flag<["-"], "enable-sil-ownership">,
|
||||
HelpText<"Enable the SIL Ownership Model">;
|
||||
|
||||
def enable_experimental_property_behaviors :
|
||||
Flag<["-"], "enable-experimental-property-behaviors">,
|
||||
HelpText<"Enable experimental property behaviors">;
|
||||
|
||||
@@ -1132,6 +1132,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
Args.hasArg(OPT_enable_guaranteed_closure_contexts);
|
||||
Opts.DisableSILPartialApply |=
|
||||
Args.hasArg(OPT_disable_sil_partial_apply);
|
||||
Opts.EnableSILOwnership |= Args.hasArg(OPT_enable_sil_ownership);
|
||||
|
||||
if (Args.hasArg(OPT_debug_on_sil)) {
|
||||
// Derive the name of the SIL file for debugging from
|
||||
|
||||
Reference in New Issue
Block a user