Add an optional language feature for Library Evolution

Replace the one-off compiler flag for Library Evolution with an
optional language feature. This makes the
`hasFeature(LibraryEvolution)` check work in an `#if`, and is
otherwise just cleanup.

Tracked by rdar://161125572.
This commit is contained in:
Doug Gregor
2025-09-22 17:45:34 -07:00
parent 87cbe5d2a9
commit c68ef1cf71
12 changed files with 28 additions and 28 deletions

View File

@@ -140,7 +140,7 @@ int swift_symbolgraph_extract_main(ArrayRef<const char *> Args,
Invocation.getLangOptions().EnableObjCInterop = Target.isOSDarwin();
Invocation.getLangOptions().DebuggerSupport = true;
Invocation.getFrontendOptions().EnableLibraryEvolution = true;
Invocation.getLangOptions().enableFeature(Feature::LibraryEvolution);
std::string ModuleCachePath = "";
if (auto *A = ParsedArgs.getLastArg(OPT_module_cache_path)) {