Skip to content

Commit e13424f

Browse files
authored
Merge pull request #5396 from gottesmm/add_silopt_flag_for_enablesilownership
2 parents a752556 + 38bfcc6 commit e13424f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/sil-opt/SILOpt.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ EnableResilience("enable-resilience",
7272
"interfaces for all public declarations by "
7373
"default"));
7474

75+
static llvm::cl::opt<bool>
76+
EnableSILOwnershipOpt("enable-sil-ownership",
77+
llvm::cl::desc("Compile the module with sil-ownership initially enabled for all functions"));
78+
7579
static llvm::cl::opt<std::string>
7680
ResourceDir("resource-dir",
7781
llvm::cl::desc("The directory that holds the compiler resource files"));
@@ -227,7 +231,7 @@ int main(int argc, char **argv) {
227231
SILOpts.AssertConfig = AssertConfId;
228232
if (OptimizationGroup != OptGroup::Diagnostics)
229233
SILOpts.Optimization = SILOptions::SILOptMode::Optimize;
230-
234+
SILOpts.EnableSILOwnership = EnableSILOwnershipOpt;
231235

232236
// Load the input file.
233237
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =

0 commit comments

Comments
 (0)