================
@@ -0,0 +1,79 @@
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu 
-fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
+
+// Test RTTI emission for pointer-to-member types 
(abi::__pointer_to_member_type_info).
+// Each descriptor must use the __pointer_to_member_type_info vtable and carry
+// three extra fields beyond the standard type_info header:
+//   __flags    (unsigned int)
+//   __pointee  (const type_info* for the pointed-to type)
+//   __context  (const __class_type_info* for the containing class)
+
+struct A {
+  int data;
+  void func();
+};
+
+// --- Test 1: data member pointer (int A::*) ---
----------------
AmrDeveloper wrote:

IMO, we can remove those comments from the test file, the information can be 
known from the function signature and body, same for the explanation about 
mapping between type and type info global name.

cc. @andykaylor 

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

Reply via email to