Skip to content

[CIR] Upstream support for virtual functions #143787

Open
@andykaylor

Description

@andykaylor

Overview

Upstream support for declaring, calling, and emitting virtual functions in CIR.

This is probably going to involve a lot of changes, including the introduction of vtables. The changes should be upstreamed in the smallest pieces possible and growing the support incrementally.

Suggested minimal test case

class C {
  int a; // Necessary until we have better handling for zero-member classes
  virtual void vf();
}

int f() {
  C c;
}

Existing incubator tests

clang/test/CIR/CodeGen/vtable-emission.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClangIRAnything related to the ClangIR project

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions