@@ -228,17 +228,10 @@ struct SILOptOptions {
228228 EnableExperimentalConcurrency = llvm::cl::opt<bool >(" enable-experimental-concurrency" ,
229229 llvm::cl::desc (" Enable experimental concurrency model." ));
230230
231- llvm::cl::opt<llvm::cl::boolOrDefault>
232- EnableLexicalLifetimes = llvm::cl::opt<llvm::cl::boolOrDefault>(
233- " enable-lexical-lifetimes" , llvm::cl::init(llvm::cl::BOU_UNSET),
234- llvm::cl::desc (" Enable lexical lifetimes. Mutually exclusive with "
235- " enable-lexical-borrow-scopes and "
236- " disable-lexical-lifetimes." ));
237-
238- llvm::cl::opt<llvm::cl::boolOrDefault>
239- EnableLexicalBorrowScopes = llvm::cl::opt<llvm::cl::boolOrDefault>(" enable-lexical-borrow-scopes" ,
240- llvm::cl::init (llvm::cl::BOU_UNSET),
241- llvm::cl::desc(" Enable lexical borrow scopes." ));
231+ llvm::cl::opt<llvm::cl::boolOrDefault> EnableLexicalLifetimes =
232+ llvm::cl::opt<llvm::cl::boolOrDefault>(
233+ " enable-lexical-lifetimes" , llvm::cl::init(llvm::cl::BOU_UNSET),
234+ llvm::cl::desc (" Enable lexical lifetimes." ));
242235
243236 llvm::cl::opt<llvm::cl::boolOrDefault>
244237 EnableExperimentalMoveOnly = llvm::cl::opt<llvm::cl::boolOrDefault>(
@@ -771,32 +764,11 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
771764
772765 llvm::Optional<bool > enableLexicalLifetimes =
773766 toOptionalBool (options.EnableLexicalLifetimes );
774- llvm::Optional<bool > enableLexicalBorrowScopes =
775- toOptionalBool (options.EnableLexicalBorrowScopes );
776-
777- // Enable lexical lifetimes if it is set or if experimental move only is
778- // enabled. This is because move only depends on lexical lifetimes being
779- // enabled and it saved some typing ; ).
780- bool specifiedLexicalLifetimesEnabled =
781- enableExperimentalMoveOnly && *enableExperimentalMoveOnly &&
782- enableLexicalLifetimes && *enableLexicalLifetimes;
783- if (specifiedLexicalLifetimesEnabled && enableLexicalBorrowScopes &&
784- !*enableLexicalBorrowScopes) {
785- fprintf (
786- stderr,
787- " Error! Cannot specify both -enable-lexical-borrow-scopes=false and "
788- " either -enable-lexical-lifetimes or -enable-experimental-move-only." );
789- exit (-1 );
790- }
767+
791768 if (enableLexicalLifetimes)
792769 SILOpts.LexicalLifetimes =
793770 *enableLexicalLifetimes ? LexicalLifetimesOption::On
794771 : LexicalLifetimesOption::DiagnosticMarkersOnly;
795- if (enableLexicalBorrowScopes)
796- SILOpts.LexicalLifetimes =
797- *enableLexicalBorrowScopes
798- ? LexicalLifetimesOption::DiagnosticMarkersOnly
799- : LexicalLifetimesOption::Off;
800772
801773 SILOpts.EnablePackMetadataStackPromotion =
802774 options.EnablePackMetadataStackPromotion ;
0 commit comments