forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 344
[Swift] Implement error handling for dwim-print -O #8920
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
Merged
adrian-prantl
merged 6 commits into
swiftlang:swift/release/6.0
from
adrian-prantl:126071026
Jun 21, 2024
Merged
[Swift] Implement error handling for dwim-print -O #8920
adrian-prantl
merged 6 commits into
swiftlang:swift/release/6.0
from
adrian-prantl:126071026
Jun 21, 2024
Conversation
This file contains hidden or 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
The code that prints ValueObjects is duplicated across two different cases of the dwim-print command, and a subsequent commit will add a third case. As such, this commit factors out the common code into a lambda. A free function was considered, but there is too much function-local context required in that. We also reword some of the comments so that they stop counting cases, making it easier to add other cases later. (cherry picked from commit 65d444b)
This change by itself has no measurable effect on the LLDB testsuite. I'm making it in preparation for threading through more errors in the Swift language plugin. (cherry picked from commit d1bc75c) Conflicts: lldb/source/API/SBValue.cpp lldb/source/Core/FormatEntity.cpp lldb/source/Core/ValueObject.cpp lldb/unittests/ValueObject/DumpValueObjectOptionsTests.cpp
This is de facto an NFC change for Objective-C but will benefit the Swift language plugin. (cherry picked from commit f900644)
(cherry picked from commit b8f0ca0) Conflicts: lldb/source/Interpreter/CommandInterpreter.cpp
@swift-ci test |
@swift-ci test |
kastiglione
approved these changes
Jun 20, 2024
llvm#96232) Previously the result would get overwritten by a success on all code paths. This is another NFC change for TypeSystemClang, because an object description cannot actually fail there. It will have different behavior in the Swift plugin. (cherry picked from commit 9473e16)
@swift-ci test |
@swift-ci test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
rdar://126071026
This is mostly cherry-picks from upstream, the Swift specific changes are in the topmost commit.