Skip to content
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

[CIR][CIRGen] Add CIRGen support for pointer-to-member-functions #722

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lancern
Copy link
Collaborator

@Lancern Lancern commented Jul 6, 2024

This PR adds the initial CIRGen support for pointer-to-member-functions. It contains the following new types, attributes, and operations:

  • !cir.method, which represents the pointer-to-member-function type.
  • #cir.method, which represents a literal pointer-to-member-function value that points to non-virtual member functions.
  • #cir.virtual_method, which represents a literal pointer-to-member-function value that points to virtual member functions.
  • cir.get_method_callee, which resolves a pointer-to-member-function to a function pointer as the callee.

See the new test at clang/test/CIR/CIRGen/pointer-to-member-func.cpp for how these new CIR stuff works to support pointer-to-member-functions.

This patch adds the initial CIRGen support for pointer-to-member-functions. It
contains the following new types, attributes, and operations:

  - `!cir.method`, which represents the pointer-to-member-function type.
  - `#cir.method`, which represents a literal pointer-to-member-function value
    that points to non-virtual member functions.
  - `#cir.virtual_method`, which represents a literal pointer-to-member-function
    value that points to virtual member functions.
  - `cir.get_method_callee`, which resolves a pointer-to-member-function to a
    function pointer as the callee.

See the new test at `clang/test/CIR/CIRGen/pointer-to-member-func.cpp` for how
these new CIR stuff works to support pointer-to-member-functions.
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.

None yet

1 participant