diff options
author | Mike Stump <mrs@apple.com> | 2009-11-17 23:11:22 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-11-17 23:11:22 +0000 |
commit | 64989f04d13d9a4a62cc7ebee6351b7c4dbe2e74 (patch) | |
tree | 6eaa617a05290f8c59a2472384ed2de0bd895bc2 /test/CodeGenCXX/rtti.cpp | |
parent | c32b1d82c1f6d0f0d6c615beb3b6bdfbfbea7098 (diff) |
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
Diffstat (limited to 'test/CodeGenCXX/rtti.cpp')
-rw-r--r-- | test/CodeGenCXX/rtti.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp index 3d8f116fc1..a673544ace 100644 --- a/test/CodeGenCXX/rtti.cpp +++ b/test/CodeGenCXX/rtti.cpp @@ -49,7 +49,7 @@ class test1_D : public test1_B7 { // 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 @@ class test1_D : public test1_B7 { // 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_A { }; 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; } |