[clang] [CIR] Implement vTableClassName for Type::ObjCObject (PR #195232)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 15:48:15 PDT 2026
================
@@ -1564,17 +1571,24 @@ mlir::Attribute CIRGenItaniumRTTIBuilder::buildTypeInfo(
break;
}
- case Type::ObjCObject:
+ case Type::ObjCObject: {
+ // Drop protocol qualifiers.
+ const Type *T = cast<ObjCObjectType>(ty)->getBaseType().getTypePtr();
+ // The builtin types are abi::__class_type_infos and don't require
+ // extra fields.
+ if (isa<BuiltinType>(T))
+ break;
+ } [[fallthrough]];
+
case Type::ObjCInterface:
- cgm.errorNYI("buildTypeInfo: ObjCObject & ObjCInterface");
+ cgm.errorNYI("buildTypeInfo: ObjCInterface");
break;
case Type::ObjCObjectPointer:
- cgm.errorNYI("buildTypeInfo: ObjCObjectPointer");
+ buildPointerTypeInfo(loc, cast<ObjCObjectPointerType>(ty)->getPointeeType());
break;
case Type::Pointer:
- // We need to get the type info for the pointee type.
----------------
andykaylor wrote:
Why did you delete this comment?
https://github.com/llvm/llvm-project/pull/195232
More information about the cfe-commits
mailing list