https://github.com/n2h9 created https://github.com/llvm/llvm-project/pull/163850

Return correct VTableClass name for Type::ObjCObjectPointer, Type::Pointer as 
defined in 
[ItaniumCXXABI.cpp](https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/ItaniumCXXABI.cpp#L4024)

Issue https://github.com/llvm/llvm-project/issues/163601

>From d637988bd2d4252fe5fe635a54b1fb4de17197d2 Mon Sep 17 00:00:00 2001
From: Nikita B <[email protected]>
Date: Thu, 16 Oct 2025 21:12:14 +0200
Subject: [PATCH] [CIR] vTableClassNameForType: return correct VTableClass name
 for Type::ObjCObjectPointer, Type::Pointer

Signed-off-by: Nikita B <[email protected]>
---
 clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp 
b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
index 1b85a530cbdd7..9494faa5ddfc7 100644
--- a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
@@ -978,8 +978,7 @@ const char *vTableClassNameForType(const CIRGenModule &cgm, 
const Type *ty) {
 
   case Type::ObjCObjectPointer:
   case Type::Pointer:
-    cgm.errorNYI("VTableClassNameForType: __pointer_type_info");
-    break;
+    return "_ZTVN10__cxxabiv119__pointer_type_infoE";
 
   case Type::MemberPointer:
     cgm.errorNYI("VTableClassNameForType: __pointer_to_member_type_info");

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to