Skip to content

Commit cea89e7

Browse files
authored
Merge pull request swiftlang#27901 from gottesmm/pr-0d9cf2f088ce0a1fe943de13e1f12711117b3668
2 parents 28a9d08 + 758d15a commit cea89e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/sil-opt/SILOpt.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ static llvm::cl::opt<bool> DisableSILOwnershipVerifier(
8181
llvm::cl::desc(
8282
"Do not verify SIL ownership invariants during SIL verification"));
8383

84+
static llvm::cl::opt<bool> EnableOwnershipLoweringAfterDiagnostics(
85+
"enable-ownership-lowering-after-diagnostics",
86+
llvm::cl::desc("Enable ownership lowering after diagnostics"),
87+
llvm::cl::init(false));
88+
8489
static llvm::cl::opt<bool>
8590
EnableSILOpaqueValues("enable-sil-opaque-values",
8691
llvm::cl::desc("Compile the module with sil-opaque-values enabled."));
@@ -333,6 +338,8 @@ int main(int argc, char **argv) {
333338
if (OptimizationGroup != OptGroup::Diagnostics)
334339
SILOpts.OptMode = OptimizationMode::ForSpeed;
335340
SILOpts.VerifySILOwnership = !DisableSILOwnershipVerifier;
341+
SILOpts.StripOwnershipAfterSerialization =
342+
EnableOwnershipLoweringAfterDiagnostics;
336343

337344
SILOpts.VerifyExclusivity = VerifyExclusivity;
338345
if (EnforceExclusivity.getNumOccurrences() != 0) {

0 commit comments

Comments
 (0)