-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Macros] PluginRegistry vends 'LoadedLibraryPlugin' instead of 'void *' #64845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please smoke test |
@@ -367,33 +364,28 @@ loadExecutablePluginByName(ASTContext &ctx, Identifier moduleName) { | |||
LoadedCompilerPlugin | |||
CompilerPluginLoadRequest::evaluate(Evaluator &evaluator, ASTContext *ctx, | |||
Identifier moduleName) const { | |||
auto fs = ctx->SourceMgr.getFileSystem(); | |||
auto &searchPathOpts = ctx->SearchPathOpts; | |||
auto *registry = ctx->getPluginRegistry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes but these variables weren't used. I should have removed these in d8c8574
990d527
to
70d2964
Compare
@swift-ci Please smoke test |
70d2964
to
8b9895a
Compare
@swift-ci Please smoke test |
lib/AST/PluginRegistry.cpp
Outdated
LoadedPluginLibraries.insert({path, lib}); | ||
return lib; | ||
|
||
storage = std::unique_ptr<LoadedLibraryPlugin>(new LoadedLibraryPlugin(lib)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use make_unique
here FWIW. But if there's no other changes I'm fine with getting this in so you don't have to re-run tests.
`LoadedLibraryPlugin` is currently just a wrapper of `void` pointer from `dlopen`. This will be convenient for abstracting platform specific dynamic linrary handling.
8b9895a
to
90e1558
Compare
@swift-ci Please smoke test |
LoadedLibraryPlugin
is currently just a wrapper ofvoid
pointer fromdlopen
. This will be convenient for abstracting platform specific dynamic library handling.Also update
LoadedCompierPlugin
making it allvm::PointerUnion