Skip to content

🍒Fix LoadableByAddress assert: missing case. #73354

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

Conversation

etcwilde
Copy link
Member

Pattern:

%f = function_ref @invocationClosure : $@convention(thin) (BigStruct) -> ()
%s = struct $InvocationWrapper (%f : $@convention(thin) (BigStruct) -> ())

Error:

Unhandled use of FunctionRefInst
UNREACHABLE executed at /swift/lib/IRGen/LoadableByAddress.cpp:3057!

This fix simply adds the unrecognized case. Rewriting a function_ref does not change its value, so I'm not sure why the assert exists in the first place.

This patch is required to build the Swift 6 compiler with the Swift 5.10 compiler. Otherwise the compiler will abort while building the optimizer in SwiftCompilerSources.

rdar://127300636
See also: #73321

Pattern:

    %f = function_ref @invocationClosure : $@convention(thin) (BigStruct) -> ()
    %s = struct $InvocationWrapper (%f : $@convention(thin) (BigStruct) -> ())

Error:

    Unhandled use of FunctionRefInst
    UNREACHABLE executed at /swift/lib/IRGen/LoadableByAddress.cpp:3057!

This fix simply adds the unrecognized case. Rewriting a function_ref
does not change its value, so I'm not sure why the assert exists in
the first place.
@etcwilde
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@shahmishal shahmishal merged commit 86a9b81 into swiftlang:release/5.10 May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants