[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:
Michael Gottesman
2016-10-10 19:22:23 -07:00
parent 5d3a7f7c23
commit e2b4e6f3fa
3 changed files with 7 additions and 0 deletions

View File

@@ -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

View File

@@ -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">;

View File

@@ -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