[cfe-commits] r88941 - in /cfe/trunk/test/CodeGenCXX: rtti.cpp typeinfo

Mike Stump mrs at apple.com
Mon Nov 16 11:34:16 PST 2009


Author: mrs
Date: Mon Nov 16 13:34:15 2009
New Revision: 88941

URL: http://llvm.org/viewvc/llvm-project?rev=88941&view=rev
Log:
Make bots happy.

Added:
    cfe/trunk/test/CodeGenCXX/typeinfo
Modified:
    cfe/trunk/test/CodeGenCXX/rtti.cpp

Modified: cfe/trunk/test/CodeGenCXX/rtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti.cpp?rev=88941&r1=88940&r2=88941&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti.cpp Mon Nov 16 13:34:15 2009
@@ -1,12 +1,10 @@
-// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t.s
+// RUN: clang-cc -I%S -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t.s
 // RUN: FileCheck --input-file=%t.s %s
 
-// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll
+// RUN: clang-cc -I%S -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll
 // RUN: FileCheck -check-prefix LL --input-file=%t.ll %s
 
 #include <typeinfo>
-// FIXME: The above doesn't work in some environments.  What's the best way to fix this?
-// XFAIL: *
 
 class test1_B1 {
   virtual void foo() { }
@@ -114,9 +112,9 @@
 // CHECK-LL-NEXT:  %vtable = load %"class.std::type_info"*** %0
 // CHECK-LL-NEXT:  %1 = getelementptr inbounds %"class.std::type_info"** %vtable, i64 -1
 // CHECK-LL-NEXT:  %2 = load %"class.std::type_info"** %1
-// CHECK-LL-NEXT:  %call = call zeroext i1 @_ZNK3std9type_infoeqERKS0_(%"class.std::type_info"* %2, %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*))
+// CHECK-LL-NEXT:  %call = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* %2, %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*))
 
-// CHECK-LL:       %call2 = call zeroext i1 @_ZNK3std9type_infoeqERKS0_(%"class.std::type_info"* bitcast (%0* @_ZTI2NP to %"class.std::type_info"*), %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*))
+// CHECK-LL:       %call2 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (%0* @_ZTI2NP to %"class.std::type_info"*), %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*))
 
 // CHECK-LL:       %3 = bitcast %class.test1_B7* %tmp5 to %"class.std::type_info"***
 // CHECK-LL-NEXT:  %4 = icmp ne %"class.std::type_info"*** %3, null
@@ -128,4 +126,4 @@
 // CHECK-LL-NEXT:  %vtable6 = load %"class.std::type_info"*** %3
 // 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 @_ZNK3std9type_infoeqERKS0_(%"class.std::type_info"* %8, %"class.std::type_info"* bitcast (%1* @_ZTI7test1_D to %"class.std::type_info"*))
+// 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"*))

Added: cfe/trunk/test/CodeGenCXX/typeinfo
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/typeinfo?rev=88941&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenCXX/typeinfo (added)
+++ cfe/trunk/test/CodeGenCXX/typeinfo Mon Nov 16 13:34:15 2009
@@ -0,0 +1,15 @@
+namespace std {
+  class type_info {
+    virtual ~type_info();
+    const char* name() const { return __name; }
+    bool operator==(const type_info& __arg) const {
+     return __name == __arg.__name;
+    }
+
+    bool operator!=(const type_info& __arg) const {
+      return !operator==(__arg);
+    }
+  protected:
+    const char *__name;
+  };
+}





More information about the cfe-commits mailing list