[clang] Add name for `ObjCInterface` in vTable (PR #166817)
Aneesh Kadiyala via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 10:03:23 PST 2025
https://github.com/ARandomDev99 created https://github.com/llvm/llvm-project/pull/166817
Related: #163601
This PR adds RTTI support for `ObjCInterface` in the vtable.
>From dcea2dec0b6f6b4ecff42cacc66b4aec123fadae Mon Sep 17 00:00:00 2001
From: Aneesh K <143342960+ARandomDev99 at users.noreply.github.com>
Date: Thu, 6 Nov 2025 23:26:13 +0530
Subject: [PATCH] [CIR] #163601: Handle `ObjCInterface`
---
clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
index f603f5ec4383d..817da3d90172d 100644
--- a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
@@ -983,7 +983,11 @@ const char *vTableClassNameForType(const CIRGenModule &cgm, const Type *ty) {
break;
case Type::ObjCInterface:
- cgm.errorNYI("VTableClassNameForType: ObjCInterface");
+ if (cast<ObjCInterfaceType>(Ty)->getDecl()->getSuperClass()) {
+ return siClassTypeInfo;
+ } else {
+ return classTypeInfo;
+ }
break;
case Type::ObjCObjectPointer:
More information about the cfe-commits
mailing list