Skip to content

[clang][deps] Lazy dependency directives rdar://125519128 #8494

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

Closed

Conversation

jansvoboda11
Copy link

No description provided.

Since b4c83a1, `Preprocessor` and
`Lexer` are aware of the concept of scanning dependency directives. This
makes it possible to scan for them on-demand rather than eagerly on the
first filesystem operation (open, or even just stat).

This might improve performance, but is also necessary for the "PCH as
module" mode. Some precompiled header sources use the ".pch" file
extension, which means they were not getting scanned for dependency
directives. This was okay when the PCH was the main input file in a
separate scan step, because there we just lex the file in a
scanning-specific frontend action. But when such source gets treated as
a module implicitly loaded from a TU, it will get compiled as any other
module - with Sema - which will result in compilation errors. (See
attached test case.)

rdar://107663951
(cherry picked from commit b768a8c)
The CAS counterpart to the upstream llvm#86347.

(cherry picked from commit 0d92d1c)
@jansvoboda11 jansvoboda11 requested a review from akyrtzi March 28, 2024 18:14
@jansvoboda11
Copy link
Author

@swift-ci please test

@jansvoboda11
Copy link
Author

Superseded by #8484 that automatically merges into stable/20230725.

@jansvoboda11 jansvoboda11 deleted the jan_svoboda/lazy-dep-directives-stable branch April 3, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants