Skip to content

[6.0] [DebugInfo] Return complete variable info from getVarInfo by default #73652

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 10 commits into from
May 17, 2024

Conversation

Snowy1803
Copy link
Member

@Snowy1803 Snowy1803 commented May 15, 2024

Snowy1803 added 9 commits May 15, 2024 15:38
The scope of a store has to be the variable's scope.
The type should be set to the element's type, and only if not already set.
The variable's location should be set.

(cherry picked from commit 7c9676e)
We should not dereference the file position if this SILLocation is not a position.
If it's a pointer, we compare the pointers.

(cherry picked from commit bc3bf84)
We do keep the fragment part of the expression as it is important
to identify fragments separately.

A variable with less fragments should be considered a superset of
variables with more fragments, but that would require to change a
lot of code.

(cherry picked from commit b293099)
The type of the new variable should be opened too.
If the variable has an expression modifying the type, it cannot be rewritten and is dropped.

(cherry picked from commit 5f2926c)
getVarInfo() now always returns a variable with a location and scope.
To opt out of this change, getVarInfo(false) returns an incomplete variable.
This can be used to work around bugs, but should only really be used for
printing.

The complete var info will also contain the type, except for debug_values,
as its type depends on another instruction, which may be inconsistent if
called mid-pass.

All locations in debug variables are now also stripped of flags, to avoid
issues when comparing or hashing debug variables.

(cherry picked from commit 0be63d0)
@Snowy1803 Snowy1803 requested a review from a team as a code owner May 15, 2024 22:41
@Snowy1803
Copy link
Member Author

@swift-ci test

rdar://128091794
(cherry picked from commit f704a0c)
@Snowy1803
Copy link
Member Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 8dd2971 into swiftlang:release/6.0 May 17, 2024
5 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.

2 participants