diff options
| author | Mike Stump <mrs@apple.com> | 2009-11-17 02:16:21 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-11-17 02:16:21 +0000 |
| commit | 3f75d552a39c7ecf54d76e3634dc4ca3c72e829e (patch) | |
| tree | af901109ec8e9f718d8a146007826caf7ca6d8b8 /clang/test | |
| parent | 27b18f8144b7cb3ec9ab864f9431ebc44a3c51fc (diff) | |
| download | bcm5719-llvm-3f75d552a39c7ecf54d76e3634dc4ca3c72e829e.tar.gz bcm5719-llvm-3f75d552a39c7ecf54d76e3634dc4ca3c72e829e.zip | |
Add typeid for the builtin types. WIP.
llvm-svn: 89028
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/rtti.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/rtti.cpp b/clang/test/CodeGenCXX/rtti.cpp index 76f571ede28..adb9d2e20f7 100644 --- a/clang/test/CodeGenCXX/rtti.cpp +++ b/clang/test/CodeGenCXX/rtti.cpp @@ -104,6 +104,8 @@ void test2_2(test1_D *dp) { test2_1(); if (typeid(((*(dp)))) == typeid(test1_D)) test2_1(); + if (typeid(int) == typeid(float)) + test2_1(); } // CHECK-LL:define void @_Z7test2_2P7test1_D(%class.test1_B7* %dp) nounwind { @@ -127,3 +129,5 @@ void test2_2(test1_D *dp) { // CHECK-LL-NEXT: %7 = getelementptr inbounds %"class.std::type_info"** %vtable6, i64 -1 // 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] |

