Skip to content

[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
merged 6 commits into from
Jun 21, 2024

Conversation

adrian-prantl
Copy link

@adrian-prantl adrian-prantl commented Jun 20, 2024

rdar://126071026

This is mostly cherry-picks from upstream, the Swift specific changes are in the topmost commit.

felipepiovezan and others added 4 commits June 20, 2024 10:52
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
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

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)
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 5b37bd4 into swiftlang:swift/release/6.0 Jun 21, 2024
3 checks passed
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.

3 participants