-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Add mechanism to notify module loading to other clients #59181
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
[AST] Add mechanism to notify module loading to other clients #59181
Conversation
d1c8e64
to
a97f092
Compare
a97f092
to
d3064d6
Compare
Did you consider making the callback a member of the ASTContext? Do the functions take different callbacks? I'm curious because that would require only adding a function + a member instead of changing 6 existing function signatures. |
All in all I'm not sure I like this version of the patch. If (most) dependencies are loaded through ASTContext, then we should only need to modify loadModule() since that's called by all the other functions eventually. |
It would be useful if we had a way of communicating the compilation of Clang module dependencies of Clang modules, because that is very slow, but IIUC, not even ClangImporter know about this as it's handled by Clang? We could try building with |
0b22a9a
to
253a2e5
Compare
Addressed @JDevlieghere & @adrian-prantl feedbacks |
@swift-ci test |
253a2e5
to
0d89418
Compare
@swift-ci test |
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.
Reasonable change with a minor comment.
This patch adds an optional callback function member to the AST Context. The callback gets invoked when a new module (or overlay module) gets loaded. This can be used for instance by other clients, such as lldb, to perform actions when a module gets loaded, like showing progress to the end-user. rdar://94165195 Signed-off-by: Med Ismail Bennani <[email protected]>
0d89418
to
fc49b5c
Compare
@swift-ci test |
Cherry-picked to main in #59466 |
This patch adds an optional callback function member to the AST Context.
The callback gets invoked when a new module (or overlay module) gets
loaded.
This can be used for instance by other clients, such as lldb, to perform
actions when a module gets loaded, like showing progress to the end-user.
rdar://94165195
Signed-off-by: Med Ismail Bennani [email protected]