-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Macros] Create plugin search lookup table. #66722
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 |
lib/AST/PluginLoader.cpp
Outdated
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.
| auto found = getPluginMap().find(moduleName); | |
| auto found = map.find(moduleName); |
5ba7f10 to
16386aa
Compare
|
@swift-ci Please smoke test |
include/swift/AST/PluginLoader.h
Outdated
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.
Thought's on making this its own type?
struct PluginEntry {
StringRef libPath;
StringRef executablePath;
};
lib/AST/PluginLoader.cpp
Outdated
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.
| /// Get plug module name from \p path if the path looks like a shared library | |
| /// Get plugin module name from \p path if the path looks like a shared library |
lib/AST/PluginLoader.cpp
Outdated
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... we just not 😅?
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.
To expand on this - sure, we might have an identifier in the map that isn't a valid. But we wouldn't be able to look it up, so it seems harmless to me.
16386aa to
4ca6bac
Compare
|
@swift-ci Please smoke test |
4ca6bac to
a27646f
Compare
|
@swift-ci Please smoke test |
Iterating all options and potential file system access is not great for every plugin lookup request. Instead, lazily create a single lookup table keyed by module name.
a27646f to
b8a073c
Compare
|
@swift-ci Please smoke test |
Iterating all options and potential file system access is not great for every plugin lookup request. Instead, lazily create a single lookup table keyed by module name.