mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Make module loaders owned by the AST context instead of ref-counted.
Also, create the Clang module loader directly rather than indirecting through a "get constructor" function. It's no longer a valid configuration to not have a Clang importer. Swift SVN r16862
This commit is contained in:
@@ -61,8 +61,10 @@ private:
|
||||
public:
|
||||
/// \brief Create a new importer that can load serialized Swift modules
|
||||
/// into the given ASTContext.
|
||||
static SerializedModuleLoader *create(ASTContext &ctx) {
|
||||
return new SerializedModuleLoader(ctx);
|
||||
static std::unique_ptr<SerializedModuleLoader> create(ASTContext &ctx) {
|
||||
return std::unique_ptr<SerializedModuleLoader>{
|
||||
new SerializedModuleLoader(ctx)
|
||||
};
|
||||
}
|
||||
|
||||
~SerializedModuleLoader();
|
||||
|
||||
Reference in New Issue
Block a user