clangir
clangir copied to clipboard
[CIR][CIRGen] Add CIRGen support for pointer-to-member-functions
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.
Sorry for the delay here, taking a look next week!
Rebased onto the latest main.
Rebased onto the latest main.
Also one conflict