File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,11 @@ static llvm::cl::opt<bool> EnableBareSlashRegexLiterals(
826826 llvm::cl::desc (" Enable the ability to write '/.../' regex literals" ),
827827 llvm::cl::init(false ));
828828
829+ static llvm::cl::list<std::string>
830+ EnableExperimentalFeatures (" enable-experimental-feature" ,
831+ llvm::cl::desc (" Enable an experimental feature" ),
832+ llvm::cl::cat(Category));
833+
829834static llvm::cl::list<std::string>
830835AccessNotesPath (" access-notes-path" , llvm::cl::desc(" Path to access notes file" ),
831836 llvm::cl::cat(Category));
@@ -4321,6 +4326,12 @@ int main(int argc, char *argv[]) {
43214326 InitInvok.getLangOptions ().EnableExperimentalStringProcessing = true ;
43224327 }
43234328
4329+ for (const auto &featureArg : options::EnableExperimentalFeatures) {
4330+ if (auto feature = getExperimentalFeature (featureArg)) {
4331+ InitInvok.getLangOptions ().Features .insert (*feature);
4332+ }
4333+ }
4334+
43244335 if (!options::Triple.empty ())
43254336 InitInvok.setTargetTriple (options::Triple);
43264337 if (!options::SwiftVersion.empty ()) {
You can’t perform that action at this time.
0 commit comments