Skip to content

[CIR] Upstream support for dynamic cast #160376

@andykaylor

Description

@andykaylor

Overview

Upstream support for compare expressions and the cir.cmp operation.

Suggested minimal test case

struct Base {
  virtual void f();
};

struct Derived : Base {};

Derived *ptr_cast(Base *b) {
  return dynamic_cast<Derived *>(b);
}

Existing incubator tests

clang/test/CIR/CodeGen/dynamic-cast.cpp
clang/test/CIR/CodeGen/dynamic-cast-relative-layout.cpp
clang/test/CIR/CodeGen/dynamic-cast-exact.cpp

Metadata

Metadata

Assignees

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