llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
308 stars 84 forks source link

[CIR][CIRGen] Support CodeGen for vbase constructors #624

Open Laity000 opened 1 month ago

Laity000 commented 1 month ago
  1. Add new cir.vtt.address_point op for visiting the element of VTT to initialize the virtual pointer.
  2. Implement getVirtualBaseClassOffset method which provides a virtual offset to adjust to the actual virtual pointer in virtual base.
  3. Follow the original clang CodeGen scheme for the implementation of most other parts.
Laity000 commented 1 month ago

Could you review this PR when you have some free time? @bcardosolopes

bcardosolopes commented 3 weeks ago

Looking at it this week! Thanks

bcardosolopes commented 1 week ago

@Laity000, one thing you'd need to add: "LLVM" checks as part of the testcase, you can see examples in some other tests (e.g. clang/test/CIR/CodeGen/abstract-cond.c).

We also just rebased against upstream, you need to update the PR too!