aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/rtti.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-17 02:16:21 +0000
committerMike Stump <mrs@apple.com>2009-11-17 02:16:21 +0000
commitea2c0b5dec07c28222856e66177f0922c9f508b1 (patch)
tree393c9976d660328c2d79e4cb9595c02fca242353 /test/CodeGenCXX/rtti.cpp
parenta24dc2e38c7fb0f7f138b3d14b5f0f241fd0eccf (diff)
Add typeid for the builtin types. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/rtti.cpp')
-rw-r--r--test/CodeGenCXX/rtti.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp
index 76f571ede2..adb9d2e20f 100644
--- a/test/CodeGenCXX/rtti.cpp
+++ b/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]