Hi all,
In section 3.1 "Summary of differences from and additions to the generic C++
ABI" [1], it says ARM requires constructor return *this* instead of void. This
patch fix test cases failures due to this ABI difference on ARM.
As for CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp, this is a
x86-specific test case. Adding triple seems to be a right solution.
Regards,
chenwj
[1]
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0041c/IHI0041C_cppabi.pdf
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
Index: CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp
===================================================================
--- CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp (revision 155819)
+++ CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp (working copy)
@@ -70,9 +70,9 @@
void target(std::initializer_list<destroyme1>);
// objects should be destroyed before dm2, after call returns
target({ destroyme1(), destroyme1() });
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
void fn3() {
@@ -80,6 +80,6 @@
// objects should be destroyed after dm2
auto list = { destroyme1(), destroyme1() };
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
}
Index: CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp
===================================================================
--- CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp (revision 155819)
+++ CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp (working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm %s -o - | FileCheck %s
// XTARGET: x86
// PR4242
// (PR 4242 bug is on 64-bit only, test passes on x86-32 as well)
Index: CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
===================================================================
--- CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp (revision 155819)
+++ CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp (working copy)
@@ -55,11 +55,11 @@
// CHECK: @globalInitList2 = global %{{[^ ]+}} { %[[WITHARG:[^ *]+]]* getelementptr inbounds ([2 x
// CHECK: appending global
// CHECK: define internal void
-// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZL25globalInitList2__initlist, i{{32|64}} 0, i{{32|64}} 0
-// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZL25globalInitList2__initlist, i{{32|64}} 0, i{{32|64}} 1
+// CHECK: call {{.*}}* @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZL25globalInitList2__initlist, i{{32|64}} 0, i{{32|64}} 0
+// CHECK: call {{.*}}* @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZL25globalInitList2__initlist, i{{32|64}} 0, i{{32|64}} 1
// CHECK: __cxa_atexit
-// CHECK: call void @_ZN10destroyme1D1Ev
-// CHECK: call void @_ZN10destroyme1D1Ev
+// CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
+// CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
std::initializer_list<witharg1> globalInitList2 = {
witharg1(destroyme1()), witharg1(destroyme1())
};
@@ -90,9 +90,9 @@
// objects should be destroyed before dm2, after call returns
// CHECK: call void @_Z6targetSt16initializer_listI10destroyme1E
target({ destroyme1(), destroyme1() });
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
void fn3() {
@@ -100,58 +100,58 @@
// objects should be destroyed after dm2
auto list = { destroyme1(), destroyme1() };
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
}
void fn4() {
// CHECK: define void @_Z3fn4v
void target(std::initializer_list<witharg1>);
// objects should be destroyed before dm2, after call returns
- // CHECK: call void @_ZN8witharg1C1ERK10destroyme1
+ // CHECK: call {{.*}}* @_ZN8witharg1C1ERK10destroyme1
// CHECK: call void @_Z6targetSt16initializer_listI8witharg1E
target({ witharg1(destroyme1()), witharg1(destroyme1()) });
- // CHECK: call void @_ZN8witharg1D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN8witharg1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
void fn5() {
// CHECK: define void @_Z3fn5v
// temps should be destroyed before dm2
// objects should be destroyed after dm2
- // CHECK: call void @_ZN8witharg1C1ERK10destroyme1
+ // CHECK: call {{.*}}* @_ZN8witharg1C1ERK10destroyme1
auto list = { witharg1(destroyme1()), witharg1(destroyme1()) };
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN8witharg1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN8witharg1D1Ev
}
void fn6() {
// CHECK: define void @_Z3fn6v
void target(const wantslist1&);
// objects should be destroyed before dm2, after call returns
- // CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
+ // CHECK: call {{.*}}* @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
// CHECK: call void @_Z6targetRK10wantslist1
target({ destroyme1(), destroyme1() });
- // CHECK: call void @_ZN10wantslist1D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10wantslist1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
void fn7() {
// CHECK: define void @_Z3fn7v
// temps should be destroyed before dm2
// object should be destroyed after dm2
- // CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
+ // CHECK: call {{.*}}* @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
wantslist1 wl = { destroyme1(), destroyme1() };
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN10wantslist1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10wantslist1D1Ev
}
void fn8() {
@@ -161,11 +161,11 @@
// CHECK: call void @_Z6targetSt16initializer_listIS_I10destroyme1EE
std::initializer_list<destroyme1> inner;
target({ inner, { destroyme1() } });
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
// Only one destroy loop, since only one inner init list is directly inited.
// CHECK-NOT: call void @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
void fn9() {
@@ -175,8 +175,8 @@
std::initializer_list<std::initializer_list<destroyme1>> list =
{ inner, { destroyme1() } };
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
// Only one destroy loop, since only one inner init list is directly inited.
// CHECK-NOT: call void @_ZN10destroyme1D1Ev
// CHECK: ret void
@@ -187,7 +187,7 @@
haslist1();
};
-// CHECK: define void @_ZN8haslist1C2Ev
+// CHECK: define {{.*}}* @_ZN8haslist1C2Ev
haslist1::haslist1()
// CHECK: alloca [3 x i32]
// CHECK: store i32 1
@@ -204,13 +204,13 @@
haslist2();
};
-// CHECK: define void @_ZN8haslist2C2Ev
+// CHECK: define {{.*}}* @_ZN8haslist2C2Ev
haslist2::haslist2()
: il{destroyme1(), destroyme1()}
{
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
}
void fn10() {
@@ -228,9 +228,9 @@
void fn11() {
// CHECK: define void @_Z4fn11v
(void) new std::initializer_list<destroyme1> {destroyme1(), destroyme1()};
- // CHECK: call void @_ZN10destroyme1D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme1D1Ev
destroyme2 dm2;
- // CHECK: call void @_ZN10destroyme2D1Ev
+ // CHECK: call {{.*}}* @_ZN10destroyme2D1Ev
}
namespace PR12178 {
Index: CodeGenCXX/compound-literals.cpp
===================================================================
--- CodeGenCXX/compound-literals.cpp (revision 155819)
+++ CodeGenCXX/compound-literals.cpp (working copy)
@@ -18,10 +18,10 @@
// CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}* [[LVALUE]], i32 0, i32 0
// CHECK-NEXT: store i32 17, i32* [[I]]
// CHECK-NEXT: [[X:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 1
- // CHECK-NEXT: call void @_ZN1XC1EPKc({{.*}}[[X]]
+ // CHECK-NEXT: call {{.*}}* @_ZN1XC1EPKc({{.*}}[[X]]
// CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 0
// CHECK-NEXT: [[RESULT:%[a-z0-9]+]] = load i32*
- // CHECK-NEXT: call void @_ZN1YD1Ev
+ // CHECK-NEXT: call {{.*}}* @_ZN1YD1Ev
// CHECK-NEXT: ret i32 [[RESULT]]
return ((Y){17, "seventeen"}).i;
}
Index: CodeGenCXX/copy-constructor-elim-2.cpp
===================================================================
--- CodeGenCXX/copy-constructor-elim-2.cpp (revision 155819)
+++ CodeGenCXX/copy-constructor-elim-2.cpp (working copy)
@@ -66,7 +66,7 @@
// CHECK: define i32 @_ZN7PR121394testEv
int test() {
// CHECK: call void @_ZN7PR121391A5makeAEv
- // CHECK-NEXT: call void @_ZN7PR121391AC1ERKS0_i
+ // CHECK-NEXT: call {{.*}}* @_ZN7PR121391AC1ERKS0_i
A a(A::makeA(), 3);
// CHECK-NEXT: getelementptr inbounds
// CHECK-NEXT: load
Index: CodeGenCXX/cxx0x-initializer-references.cpp
===================================================================
--- CodeGenCXX/cxx0x-initializer-references.cpp (revision 155819)
+++ CodeGenCXX/cxx0x-initializer-references.cpp (working copy)
@@ -60,10 +60,10 @@
{
// Ensure lifetime extension.
- // CHECK: call void @_ZN9reference1BC1Ev
+ // CHECK: call {{.*}}* @_ZN9reference1BC1Ev
// CHECK-NEXT: store %{{.*}}* %{{.*}}, %{{.*}}** %
const B &rb{ B() };
- // CHECK: call void @_ZN9reference1BD1Ev
+ // CHECK: call {{.*}}* @_ZN9reference1BD1Ev
}
}
Index: CXX/special/class.copy/p15-inclass.cpp
===================================================================
--- CXX/special/class.copy/p15-inclass.cpp (revision 155819)
+++ CXX/special/class.copy/p15-inclass.cpp (working copy)
@@ -20,9 +20,9 @@
X x3(static_cast<X&&>(x));
}
- // CHECK: define linkonce_odr void @_ZN7PR114181XC2EOS0_
+ // CHECK: define linkonce_odr {{.*}}* @_ZN7PR114181XC2EOS0_
// CHECK-NOT: 17
- // CHECK: call void @_ZN7PR114186NonPODC1EOS0_
+ // CHECK: call {{.*}}* @_ZN7PR114186NonPODC1EOS0_
// CHECK-NOT: 17
// CHECK: load i32*
// CHECK-NOT: 17
@@ -30,9 +30,9 @@
// CHECK-NOT: 17
// CHECK: ret
- // CHECK: define linkonce_odr void @_ZN7PR114181XC2ERKS0_
+ // CHECK: define linkonce_odr {{.*}}* @_ZN7PR114181XC2ERKS0_
// CHECK-NOT: 17
- // CHECK: call void @_ZN7PR114186NonPODC1ERKS0_
+ // CHECK: call {{.*}}* @_ZN7PR114186NonPODC1ERKS0_
// CHECK-NOT: 17
// CHECK: load i32*
// CHECK-NOT: 17
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits