Add rtti info for function prototypes and refactor. This allows
pointer to member functions to work. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89161 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp
index 3d8f116..a673544 100644
--- a/test/CodeGenCXX/rtti.cpp
+++ b/test/CodeGenCXX/rtti.cpp
@@ -49,7 +49,7 @@
// CHECK-NEXT: .quad __ZTIi
// CHECK-NEXT: .quad __ZTI7test3_A
-// CHECK:__ZTIM7test3_Ii:
+// CHECK: __ZTIM7test3_Ii:
// CHECK-NEXT: .quad (__ZTVN10__cxxabiv129__pointer_to_member_type_infoE) + 16
// CHECK-NEXT: .quad __ZTSM7test3_Ii
// CHECK-NEXT: .long 16
@@ -57,6 +57,19 @@
// CHECK-NEXT: .quad __ZTIi
// CHECK-NEXT: .quad __ZTI7test3_I
+// CHECK: __ZTIFvvE:
+// CHECK-NEXT: .quad (__ZTVN10__cxxabiv120__function_type_infoE) + 16
+// CHECK-NEXT: .quad __ZTSFvvE
+
+// CHECK: __ZTIM7test3_AFvvE:
+// CHECK-NEXT: .quad (__ZTVN10__cxxabiv129__pointer_to_member_type_infoE) + 16
+// CHECK-NEXT: .quad __ZTSM7test3_AFvvE
+// CHECK-NEXT: .space 4
+// CHECK-NEXT: .space 4
+// CHECK-NEXT: .quad __ZTIFvvE
+// CHECK-NEXT: .quad __ZTI7test3_A
+
+
// CHECK:__ZTI7test1_D:
// CHECK-NEXT: .quad (__ZTVN10__cxxabiv120__si_class_type_infoE) + 16
@@ -167,10 +180,13 @@
class test3_I;
int (test3_A::*pmd);
int (test3_I::*i_pmd);
+void (test3_A::*pmf)();
int test3() {
if (typeid(volatile int *) == typeid(int *))
return 1;
if (typeid(pmd) == typeid(i_pmd))
return 1;
+ if (typeid(pmd) == typeid(pmf))
+ return 1;
return 0;
}