Skip to content

Fix LoadableByAddress assert: missing case. #70919

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
Jan 15, 2024

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jan 15, 2024

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.

@atrick atrick requested a review from aschwaighofer January 15, 2024 00:30
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.
@atrick atrick force-pushed the fix-loadablebyaddress branch from 175dad1 to 0cf47e1 Compare January 15, 2024 00:31
@atrick
Copy link
Contributor Author

atrick commented Jan 15, 2024

@swift-ci test

@atrick atrick enabled auto-merge January 15, 2024 00:32
@atrick atrick merged commit 8ae3ee9 into swiftlang:main Jan 15, 2024
Copy link
Contributor

@aschwaighofer aschwaighofer 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

@atrick atrick deleted the fix-loadablebyaddress branch July 5, 2024 07:05
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