Skip to content

[CIR] LLVM lowering support for pointers to member functions #1292

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
Feb 22, 2025

Conversation

Lancern
Copy link
Member

@Lancern Lancern commented Jan 26, 2025

This PR adds support for LLVM lowering of pointers to member functions. The lowering is ABI-specific and this patch only considers Itanium ABI.

Itanium ABI lowers pointers to member functions to a struct with two fields of type ptrdiff_t. To extract fields from such aggregate values, this PR includes a new operation cir.extract_member to accomplish this.

@bcardosolopes
Copy link
Member

We just went over a rebase against upstream, apologies for the churn but please update your branch for this PR and force-push!

@Lancern Lancern force-pushed the member-func-ptr-lowering branch from bfaa2cd to 5ea5c5c Compare February 4, 2025 13:55
@Lancern
Copy link
Member Author

Lancern commented Feb 4, 2025

Rebased onto the latest main.

@bcardosolopes
Copy link
Member

needs conflict fixing and ready to go

This patch adds support for LLVM lowering of pointers to member functions. The
lowering is ABI-specific and this patch only considers Itanium ABI.

Itanium ABI lowers pointers to member functions to a struct with two fields of
type `ptrdiff_t`. To extract fields from such aggregate values, this patch
includes a new operation `cir.extract_member` to accomplish this.
@Lancern Lancern force-pushed the member-func-ptr-lowering branch from 4ee57cb to b45eece Compare February 22, 2025 12:42
@Lancern
Copy link
Member Author

Lancern commented Feb 22, 2025

Rebased onto the latest main.

@Lancern
Copy link
Member Author

Lancern commented Feb 22, 2025

All checks pass. Merging.

@Lancern Lancern merged commit c301b4a into llvm:main Feb 22, 2025
6 checks passed
@Lancern Lancern deleted the member-func-ptr-lowering branch February 22, 2025 14:07
lanza pushed a commit that referenced this pull request Mar 18, 2025
This PR adds support for LLVM lowering of pointers to member functions.
The lowering is ABI-specific and this patch only considers Itanium ABI.

Itanium ABI lowers pointers to member functions to a struct with two
fields of type `ptrdiff_t`. To extract fields from such aggregate
values, this PR includes a new operation `cir.extract_member` to
accomplish this.
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