Skip to content

[TypeLowering] Fixed verifier variable shadowing. #64971

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 1 commit into from
Apr 6, 2023

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Apr 6, 2023

To work around a build failure on MSVC, f53e88b changed what was vended from the verifier’s worklist from a TaggedEnum<ValueDecl *, unsigned> to two fields ValueDecl * and Optional<unsigned> with the idea that only one should ever be non-none. That change failed, however, to return the optional unsigned index represented by the value in the worklist, instead returning the actual value. That’s a problem because the worklist can’t contain Optional<unsigned> but only unsigned with UINT_MAX indicating "none".

rdar://107709069

To work around a build failure on MSVC,
f53e88b changed what was stored in the
verifier’s worklist from a `TaggedEnum<ValueDecl *, unsigned>` to two
fields `ValueDecl *` and `Optional<unsigned>` with the idea that only
one should ever be non-none.  That change failed, however, to return the
_optional_ unsigned index represented by the value in the worklist,
instead returning the actual value.  That’s a problem because the
worklist can’t contain `Optional<unsigned>` but only unsigned with
`UINT_MAX` indicating "none".

rdar://107709069
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler merged commit fd86e03 into swiftlang:main Apr 6, 2023
@nate-chandler nate-chandler deleted the rdar107709069 branch April 6, 2023 21:03
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