mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -25,20 +25,16 @@ class SourceLoader : public ModuleLoader {
|
||||
private:
|
||||
ASTContext &Ctx;
|
||||
std::vector<ModuleDecl *> ModulesToBindExtensions;
|
||||
bool EnableLibraryEvolution;
|
||||
|
||||
explicit SourceLoader(ASTContext &ctx,
|
||||
bool enableResilience,
|
||||
DependencyTracker *tracker)
|
||||
: ModuleLoader(tracker), Ctx(ctx),
|
||||
EnableLibraryEvolution(enableResilience) {}
|
||||
: ModuleLoader(tracker), Ctx(ctx) {}
|
||||
|
||||
public:
|
||||
static std::unique_ptr<SourceLoader>
|
||||
create(ASTContext &ctx, bool enableResilience,
|
||||
DependencyTracker *tracker = nullptr) {
|
||||
create(ASTContext &ctx, DependencyTracker *tracker = nullptr) {
|
||||
return std::unique_ptr<SourceLoader>{
|
||||
new SourceLoader(ctx, enableResilience, tracker)
|
||||
new SourceLoader(ctx, tracker)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user