@@ -283,12 +283,6 @@ int main(int argc, char **argv) {
283283 opt<bool > EnableOSSAModules (" enable-ossa-modules" , init (false ),
284284 desc (" Serialize modules in OSSA" ), cat (Visible));
285285
286- opt<bool > EnableNoncopyableGenerics (
287- " enable-noncopyable-generics" ,
288- init (false ),
289- desc (" Serialize modules with NoncopyableGenerics" ),
290- cat (Visible));
291-
292286 ParseCommandLineOptions (argc, argv);
293287
294288 // Unregister our options so they don't interfere with the command line
@@ -326,14 +320,16 @@ int main(int argc, char **argv) {
326320 if (Modules.empty ())
327321 return 0 ;
328322
323+ bool enableNoncopyableGenerics = SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS;
324+
329325 swift::serialization::ValidationInfo info;
330326 swift::serialization::ExtendedValidationInfo extendedInfo;
331327 llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
332328 for (auto &Module : Modules) {
333329 info = {};
334330 extendedInfo = {};
335331 if (!validateModule (StringRef (Module.first , Module.second ), Verbose,
336- EnableOSSAModules, EnableNoncopyableGenerics ,
332+ EnableOSSAModules, enableNoncopyableGenerics ,
337333 info, extendedInfo, searchPaths)) {
338334 llvm::errs () << " Malformed module!\n " ;
339335 return 1 ;
@@ -359,13 +355,6 @@ int main(int argc, char **argv) {
359355 Invocation.getLangOptions ().EnableMemoryBufferImporter = true ;
360356 Invocation.getSILOptions ().EnableOSSAModules = EnableOSSAModules;
361357
362- if (EnableNoncopyableGenerics)
363- Invocation.getLangOptions ()
364- .enableFeature (swift::Feature::NoncopyableGenerics);
365- else
366- Invocation.getLangOptions ()
367- .disableFeature (swift::Feature::NoncopyableGenerics);
368-
369358 if (!ResourceDir.empty ()) {
370359 Invocation.setRuntimeResourcePath (ResourceDir);
371360 }
0 commit comments