[clang] [CIR] Implement the relative-vtable RTTI definitions (PR #248103)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 15:49:16 PST 2026


================
@@ -85,21 +85,50 @@ void E::f() {}
 
 void *makeE() { return new E; }
 
+// A single inheritance class has a type_info of the runtime's
+// __si_class_type_info. Defining the vtable of that class in this TU, as the
+// runtime library does, makes the type_info point at its address point.
+namespace __cxxabiv1 {
----------------
andykaylor wrote:

Claude tells me that your changes fail with this variation because of the order of the definitions:

```
struct A { virtual void f(); };
struct G : A { void f() override; };
void G::f() {}
namespace __cxxabiv1 {
class __si_class_type_info { public: virtual ~__si_class_type_info(); };
__si_class_type_info::~__si_class_type_info() {}
}
```

https://github.com/llvm/llvm-project/pull/248103


More information about the cfe-commits mailing list