Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang] Improve compile times when forming a DeclRef outside of a cap…
…turing scope. The logic of whether an entity needs to be captured has become quite complex and the recent changes in https://reviews.llvm.org/D124351 ad a mesurable negative impact on compile times. However, in the absence of capturing scopes (lambda, block, region) we usually can avoid running most of that logic (except that we do need to diagnostic when a nested function refers to a local variable in the scope of the outer function.). This patch track whether there is currently an active capturing scope and exit `tryCaptureVariable` early when there isn't. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D150038
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters