[clang] [CIR]lAdd name for function type in vtable (PR #163839)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 11:23:13 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Adrian (y-Adrian)

<details>
<summary>Changes</summary>

This commit adds the RTTI support for function type in the vtable.

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

---
Full diff: https://github.com/llvm/llvm-project/pull/163839.diff


1 Files Affected:

- (modified) clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp (+1-2) 


``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
index 1b85a530cbdd7..44919de69ae8e 100644
--- a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
@@ -946,8 +946,7 @@ const char *vTableClassNameForType(const CIRGenModule &cgm, const Type *ty) {
 
   case Type::FunctionNoProto:
   case Type::FunctionProto:
-    cgm.errorNYI("VTableClassNameForType: __function_type_info");
-    break;
+    return "__ZTSN10__cxxabiv120__function_type_infoE";
 
   case Type::Enum:
     cgm.errorNYI("VTableClassNameForType: Enum");

``````````

</details>


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


More information about the cfe-commits mailing list