[lldb][progress] Improve Swift progress reporting (#7769) #8098
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LLDB's progress reporting infrastructure has had the ability to add details to an overall progress report (added in
https://reviews.llvm.org/D143690) but this had yet to be implemented in existing progress reports. This commit adds this functionality to progress reports made for Swift operations (such as caching user imports) so that instead of sending several individual progress reports for each step in these operations, one progress report is created and then incrementally updated.
Importing Swift modules takes place in the Swift compiler which uses a callback function so that LLDB can perform its progress report. This originally called into a function in
lldb_private::SwiftASTContext
but will instead use a lambda function to increment a locally created progress report.Related to: swiftlang/swift#69730
rdar://105286354
(cherry picked from commit 4106480)