@@ -223,6 +223,10 @@ struct SILOptOptions {
223223 ExperimentalFeatures = llvm::cl::list<std::string>(" enable-experimental-feature" ,
224224 llvm::cl::desc (" Enable the given experimental feature." ));
225225
226+ llvm::cl::list<std::string> UpcomingFeatures = llvm::cl::list<std::string>(
227+ " enable-upcoming-feature" ,
228+ llvm::cl::desc (" Enable the given upcoming feature." ));
229+
226230 llvm::cl::opt<bool >
227231 EnableExperimentalConcurrency = llvm::cl::opt<bool >(" enable-experimental-concurrency" ,
228232 llvm::cl::desc (" Enable experimental concurrency model." ));
@@ -652,11 +656,20 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
652656 options.BypassResilienceChecks ;
653657 Invocation.getDiagnosticOptions ().PrintDiagnosticNames =
654658 options.DebugDiagnosticNames ;
659+ for (auto &featureName : options.UpcomingFeatures ) {
660+ if (auto feature = getUpcomingFeature (featureName)) {
661+ Invocation.getLangOptions ().enableFeature (*feature);
662+ } else {
663+ llvm::errs () << " error: unknown upcoming feature "
664+ << QuotedString (featureName) << " \n " ;
665+ exit (-1 );
666+ }
667+ }
655668 for (auto &featureName : options.ExperimentalFeatures ) {
656669 if (auto feature = getExperimentalFeature (featureName)) {
657670 Invocation.getLangOptions ().enableFeature (*feature);
658671 } else {
659- llvm::errs () << " error: unknown feature "
672+ llvm::errs () << " error: unknown experimental feature "
660673 << QuotedString (featureName) << " \n " ;
661674 exit (-1 );
662675 }
0 commit comments