]> granicus.if.org Git - clang/commitdiff
Fix C++ constructor/destructor tests when run on ARM
authorStephen Lin <stephenwlin@gmail.com>
Tue, 18 Jun 2013 20:24:04 +0000 (20:24 +0000)
committerStephen Lin <stephenwlin@gmail.com>
Tue, 18 Jun 2013 20:24:04 +0000 (20:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184225 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/copy-constructor-synthesis-2.cpp
test/CodeGenCXX/default-constructor-template-member.cpp
test/CodeGenCXX/mangle-template.cpp
test/CodeGenCXX/virtual-base-destructor-call.cpp

index d028a28fdd675f93edd9e2b18f3f247e1ec2a87c..e84ffd93bee564a011008e251620ba12ed9f7732 100644 (file)
@@ -1,7 +1,11 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-linux | FileCheck --check-prefix=CHECKX86 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=arm-linux-gnueabihf | FileCheck --check-prefix=CHECKARM %s
 
 struct A { virtual void a(); };
 A x(A& y) { return y; }
 
-// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* %this, %struct.A*) unnamed_addr
-// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
+// CHECKX86: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* %this, %struct.A*) unnamed_addr
+// CHECKX86: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
+
+// CHECKARM: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* returned %this, %struct.A*) unnamed_addr
+// CHECKARM: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
index 0dd64dfcb4c91c76e8b4c8dc5d6676797f4d9d82..27f2ba26202316cf8a415cbdc6480f9dd730c908 100644 (file)
@@ -1,10 +1,16 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-linux | FileCheck --check-prefix=CHECKX86 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=arm-linux-gnueabihf | FileCheck --check-prefix=CHECKARM %s
 
 template <class T> struct A { A(); };
 struct B { A<int> x; };
 void a() {   
   B b;
 }
-// CHECK: call {{.*}} @_ZN1BC1Ev
-// CHECK: define linkonce_odr {{.*}} @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
-// CHECK: call {{.*}} @_ZN1AIiEC1Ev
+
+// CHECKX86: call {{.*}} @_ZN1BC1Ev
+// CHECKX86: define linkonce_odr {{.*}} @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
+// CHECKX86: call {{.*}} @_ZN1AIiEC1Ev
+
+// CHECKARM: call {{.*}} @_ZN1BC1Ev
+// CHECKARM: define linkonce_odr {{.*}} @_ZN1BC1Ev(%struct.B* returned %this) unnamed_addr
+// CHECKARM: call {{.*}} @_ZN1AIiEC1Ev
index 15a85c7bd2e53903876070ddf82a786e46d5e781..03eae53ad02eeae7e5f61ae760f0697f635312c9 100644 (file)
@@ -82,7 +82,7 @@ namespace test7 {
     X(U*, typename int_c<(meta<T>::value + meta<U>::value)>::type *) { }
   };
 
-  // CHECK: define weak_odr {{.*}} @_ZN5test71XIiEC1IdEEPT_PNS_5int_cIXplL_ZNS_4metaIiE5valueEEsr4metaIS3_EE5valueEE4typeE(%"struct.test7::X"* %this, double*, float*) unnamed_addr
+  // CHECK: define weak_odr {{.*}} @_ZN5test71XIiEC1IdEEPT_PNS_5int_cIXplL_ZNS_4metaIiE5valueEEsr4metaIS3_EE5valueEE4typeE(
   template X<int>::X(double*, float*);
 }
 
@@ -101,7 +101,7 @@ namespace test8 {
   template<typename T>
   void f(int_c<meta<T>::type::value>) { }
 
-  // CHECK: define weak_odr void @_ZN5test81fIiEEvNS_5int_cIXsr4metaIT_E4typeE5valueEEE
+  // CHECK: define weak_odr void @_ZN5test81fIiEEvNS_5int_cIXsr4metaIT_E4typeE5valueEEE(
   template void f<int>(int_c<sizeof(int)>);
 }
 
index 2424d218d6b7ad2ea1e564942baff47776a1fb9d..a8d4520b5eb59aa015fa4915fd03336642f29cc1 100644 (file)
@@ -18,34 +18,34 @@ int main() {
 
 // basic_iostream's complete dtor calls its base dtor, then its
 // virtual base's dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED1Ev(%struct.basic_iostream* %this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED1Ev(%struct.basic_iostream* {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN14basic_iostreamIcED2Ev
 //  CHECK: call {{.*}} @_ZN9basic_iosD2Ev
 
 // basic_iostream's base dtor calls its non-virtual base dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED2Ev(%struct.basic_iostream* %this, i8** %vtt) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED2Ev(%struct.basic_iostream* {{.*}}%this, i8** %vtt) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED2Ev
 //  CHECK: }
 
 // basic_iostream's deleting dtor calls its complete dtor, then
 // operator delete().
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED0Ev(%struct.basic_iostream* %this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED0Ev(%struct.basic_iostream* {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN14basic_iostreamIcED1Ev
 //  CHECK: call {{.*}} @_ZdlPv
 
 // basic_istream's complete dtor calls the base dtor,
 // then its virtual base's base dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED1Ev(%struct.basic_istream* %this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED1Ev(%struct.basic_istream* {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED2Ev
 //  CHECK: call {{.*}} @_ZN9basic_iosD2Ev
 
 // basic_istream's deleting dtor calls the complete dtor, then
 // operator delete().
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED0Ev(%struct.basic_istream* %this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED0Ev(%struct.basic_istream* {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED1Ev
 //  CHECK: call {{.*}} @_ZdlPv
 
 // basic_istream's base dtor is a no-op.
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED2Ev(%struct.basic_istream* %this, i8** %vtt) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED2Ev(%struct.basic_istream* {{.*}}%this, i8** %vtt) unnamed_addr
 //  CHECK-NOT: call
 //  CHECK: }