diff options
author | Mike Stump <mrs@apple.com> | 2009-11-17 02:57:13 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-11-17 02:57:13 +0000 |
commit | 21f5d5d74a1d8c750c29e5fc68fb45e4abfbae58 (patch) | |
tree | 205bade1a4bab4c8fbfa8cfebcb51ec6c289874c /test/CodeGenCXX/rtti.cpp | |
parent | c6ea5d4f6e3049617e829e428f78f3d63da2cf52 (diff) |
Add typeinfo support for T* and const T* for all builtin types T.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/rtti.cpp')
-rw-r--r-- | test/CodeGenCXX/rtti.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp index adb9d2e20f..8af77de1c2 100644 --- a/test/CodeGenCXX/rtti.cpp +++ b/test/CodeGenCXX/rtti.cpp @@ -106,6 +106,8 @@ void test2_2(test1_D *dp) { test2_1(); if (typeid(int) == typeid(float)) test2_1(); + if (typeid(int*) == typeid(const int *)) + test2_1(); } // CHECK-LL:define void @_Z7test2_2P7test1_D(%class.test1_B7* %dp) nounwind { @@ -130,4 +132,6 @@ void test2_2(test1_D *dp) { // CHECK-LL-NEXT: %8 = load %"class.std::type_info"** %7 // CHECK-LL-NEXT: %call7 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* %8, %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*)) -// CHECK-LL: %call10 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (i8** @_ZTIi to %"class.std::type_info"*), %"class.std::type_info"* bitcast (i8** @_ZTIf to %"class.std::type_info"*)) ; <i1> [#uses=1] +// CHECK-LL: %call10 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (i8** @_ZTIi to %"class.std::type_info"*), %"class.std::type_info"* bitcast (i8** @_ZTIf to %"class.std::type_info"*)) + +// CHECK-LL: %call13 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (i8** @_ZTIPi to %"class.std::type_info"*), %"class.std::type_info"* bitcast (i8** @_ZTIPKi to %"class.std::type_info"*)) |