clangir icon indicating copy to clipboard operation
clangir copied to clipboard

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

Open Lancern opened this issue 1 year ago • 2 comments

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.

Lancern avatar Jul 06 '24 12:07 Lancern

Sorry for the delay here, taking a look next week!

bcardosolopes avatar Jul 26 '24 22:07 bcardosolopes

Rebased onto the latest main.

Lancern avatar Jul 28 '24 09:07 Lancern

Rebased onto the latest main.

Lancern avatar Aug 11 '24 13:08 Lancern

Also one conflict

bcardosolopes avatar Aug 15 '24 23:08 bcardosolopes