Issue 180591
Summary [CIR] Upstream vtable thunk handling
Labels ClangIR
Assignees
Reporter andykaylor
    ### Overview
Upstream the code to emit vtable thunks in CIR. The test case below should result in `error: ClangIR code gen Not Yet Implemented: emitThunks` when compiled with a build of Clang from the main LLVM repository using the `-fclangir` option. The code to emit thunks is present in the ClangIR incubator. It just needs to be worked through the upstreaming process, ensuring it meets the LLVM coding standards, testing, and quality expectations.

### Suggested minimal test case
```
class Base1 {
public:
  virtual void foo() {}
  int x;
};

class Base2 {
public:
 virtual void bar() {}
  int y;
};

class Derived : public Base1, public Base2 {
public:
  void bar() override {}
};

void test() {
  Derived d;
  Base2* b2 = &d;
  b2->bar();
}
```

### Existing incubator tests
clang/test/CIR/CodeGen/vtable-thunk.cpp
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to