This PR adds LLVM lowering support for data member pointers. It includes the following changes:
The #cir.data_member attribute now has a new parameter named memberOffset. When the data member pointer is not null, this parameter gives the offset of the pointed-to member within its containing object. This offset is calculated by target ABI.
A new attribute #cir.data_member_ptr_layout is added. It contains ABI-specific layout information about a data member pointer that is required to lower it to LLVM IR. This attribute is attached to the module op, and it is queried during LLVMIR lowering to obtain the lowering information in it.
Some CIRGen of the data member pointers is refactored to follow the upstream CodeGen skeleton.
This PR adds LLVM lowering support for data member pointers. It includes the following changes:
The#cir.data_member
attribute now has a new parameter namedmemberOffset
. When the data member pointer is not null, this parameter gives the offset of the pointed-to member within its containing object. This offset is calculated by target ABI.A new attribute#cir.data_member_ptr_layout
is added. It contains ABI-specific layout information about a data member pointer that is required to lower it to LLVM IR. This attribute is attached to the module op, and it is queried during LLVMIR lowering to obtain the lowering information in it.