-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Dependency Scanning] Restrict Swift overlay lookup to "visible" Clang modules only #83050
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
base: main
Are you sure you want to change the base?
[Dependency Scanning] Restrict Swift overlay lookup to "visible" Clang modules only #83050
Conversation
@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.
LGTM
1 similar comment
1c73538
to
5600184
Compare
5600184
to
b38ca14
Compare
swiftlang/llvm-project#10987 |
swiftlang/llvm-project#10987 |
I am seeing CI hit failures in:
and
Intermittently. I haven't been able to reproduce them locally yet but I suspect there's a memory bug here somewhere. |
…ngTool::getModuleDependencies'
…g modules only Previously Swift overlay lookup was performed for every directly and transitively-imported Clang module. llvm/llvm-project#147969 introduced the concept of "visible" Clang modules from a given named Clang dependency scanner query which closely maps to the set of modules for which Swift will attempt to load a Swift overlay. This change switches overlay querying to apply only to the set of such visible modules. Resolves rdar://144797648
…ft modules are always queried by-name to the Clang dependency scanner This is required in order to always have computed the set of visible Clang modules for each Swift module in the graph. Otherwise when some Clang module gets cached as a transitive dependency from a query and is later looked up as a direct dependency, there will not be any computed visible modules set.
b38ca14
to
27305d6
Compare
llvm/llvm-project#147969 added support to the Clang dependency scanner to query the set of "visible" modules for a given TU or named query. Swift must utilize this data to driver lookup of Swift module overlays. Previously, the scanner implementation queried Swift module overlay dependencies for a Swift module by checking all of its imported Clang modules, direct and transitive - even when not re-exported. With this change, the scanner's overlay lookup is only done for a Swift module's "visible" set of Clang module dependencies as reported by the scanner, matching the behavior expected to occur in the subsequent compilation task.