зеркало из https://github.com/microsoft/clang-1.git
Move unnamed_addr after the function arguments on Sabre's request.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
9f0f3cd94a
Коммит
0691a5c832
|
@ -26,17 +26,17 @@ struct X4 {
|
|||
struct X5 : X0, X4 { };
|
||||
|
||||
void test(X2 x2, X3 x3, X5 x5) {
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X2C1ERKS_
|
||||
// CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X0* %this, %struct.X0*) unnamed_addr
|
||||
// CHECK: call void @_ZN2X2C2ERKS_({{.*}}) nounwind
|
||||
// CHECK-NEXT: ret void
|
||||
// CHECK-NEXT: }
|
||||
X2 x2a(x2);
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X3C1ERKS_
|
||||
// CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X0* %this, %struct.X0*) unnamed_addr
|
||||
// CHECK: call void @_ZN2X3C2ERKS_({{.*}}) nounwind
|
||||
// CHECK-NEXT: ret void
|
||||
// CHECK-NEXT: }
|
||||
X3 x3a(x3);
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X5C1ERS_
|
||||
// CHECK: define linkonce_odr void @_ZN2X5C1ERS_({{.*}}) unnamed_addr
|
||||
// CHECK-NOT: call void @__cxa_call_unexpected
|
||||
// CHECK: ret void
|
||||
X5 x5a(x5);
|
||||
|
@ -55,24 +55,24 @@ struct X8 : X6 { };
|
|||
struct X9 : X6, X7 { };
|
||||
|
||||
void test() {
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X8C1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN2X8C1Ev(%struct.X0* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN2X8C2Ev({{.*}}) nounwind
|
||||
// CHECK-NEXT: ret void
|
||||
X8();
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X9C1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN2X9C1Ev(%struct.X0* %this) unnamed_addr
|
||||
// FIXME: check that this is the end of the line here:
|
||||
// CHECK: call void @_ZN2X9C2Ev({{.*}})
|
||||
// CHECK-NEXT: ret void
|
||||
X9();
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X9C2Ev
|
||||
// CHECK: define linkonce_odr void @_ZN2X9C2Ev(%struct.X0* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN2X6C2Ev({{.*}}) nounwind
|
||||
// FIXME: and here:
|
||||
// CHECK-NEXT: call void @_ZN2X7C2Ev({{.*}})
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X8C2Ev
|
||||
// CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X0* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN2X6C2Ev({{.*}}) nounwind
|
||||
// CHECK-NEXT: ret void
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace test1 {
|
|||
a.bar();
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr [[A]]* @_ZN5test11AC1Ei([[A]]*
|
||||
// CHECK: define linkonce_odr [[A]]* @_ZN5test11AC1Ei([[A]]* %this, i32 %i) unnamed_addr
|
||||
// CHECK: [[RET:%.*]] = alloca [[A]]*, align 4
|
||||
// CHECK: [[THIS:%.*]] = alloca [[A]]*, align 4
|
||||
// CHECK: store [[A]]* {{.*}}, [[A]]** [[THIS]]
|
||||
|
@ -54,7 +54,7 @@ namespace test1 {
|
|||
// CHECK: [[THIS2:%.*]] = load [[A]]** [[RET]]
|
||||
// CHECK: ret [[A]]* [[THIS2]]
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr [[A]]* @_ZN5test11AD1Ev([[A]]*
|
||||
// CHECK: define linkonce_odr [[A]]* @_ZN5test11AD1Ev([[A]]* %this) unnamed_addr
|
||||
// CHECK: [[RET:%.*]] = alloca [[A]]*, align 4
|
||||
// CHECK: [[THIS:%.*]] = alloca [[A]]*, align 4
|
||||
// CHECK: store [[A]]* {{.*}}, [[A]]** [[THIS]]
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace InitVTable {
|
|||
B(int);
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN10InitVTable1BC2Ev(
|
||||
// CHECK: define void @_ZN10InitVTable1BC2Ev(%"struct.InitVTable::B"* %this) unnamed_addr
|
||||
// CHECK: [[T0:%.*]] = bitcast [[B:%.*]]* [[THIS:%.*]] to i8***
|
||||
// CHECK-NEXT: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN10InitVTable1BE, i64 0, i64 2), i8*** [[T0]]
|
||||
// CHECK: [[VTBL:%.*]] = load i32 ([[B]]*)*** {{%.*}}
|
||||
|
@ -104,7 +104,7 @@ namespace InitVTable {
|
|||
// CHECK-NEXT: ret void
|
||||
B::B() : A(foo()) {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN10InitVTable1BC2Ei(
|
||||
// CHECK: define void @_ZN10InitVTable1BC2Ei(%"struct.InitVTable::B"* %this, i32 %x) unnamed_addr
|
||||
// CHECK: [[ARG:%.*]] = add nsw i32 {{%.*}}, 5
|
||||
// CHECK-NEXT: call void @_ZN10InitVTable1AC2Ei({{.*}}* {{%.*}}, i32 [[ARG]])
|
||||
// CHECK-NEXT: [[T0:%.*]] = bitcast [[B]]* {{%.*}} to i8***
|
||||
|
@ -125,7 +125,7 @@ template<typename T> struct X;
|
|||
|
||||
// Make sure that the instantiated constructor initializes start and
|
||||
// end properly.
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1XIiEC2ERKS0_
|
||||
// CHECK: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* %other) unnamed_addr
|
||||
// CHECK: {{store.*null}}
|
||||
// CHECK: {{store.*null}}
|
||||
// CHECK: ret
|
||||
|
|
|
@ -21,18 +21,18 @@ struct A {
|
|||
A::A(struct Undeclared &ref) : mem(0) {}
|
||||
|
||||
// Check that delegation works.
|
||||
// CHECK: define unnamed_addr void @_ZN1AC1ER10Undeclared(
|
||||
// CHECK: define void @_ZN1AC1ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
|
||||
// CHECK: call void @_ZN1AC2ER10Undeclared(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1AC2ER10Undeclared(
|
||||
// CHECK: define void @_ZN1AC2ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
A::A(ValueClass v) : mem(v.y - v.x) {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1AC1E10ValueClass(
|
||||
// CHECK: define void @_ZN1AC1E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
|
||||
// CHECK: call void @_ZN1AC2E10ValueClass(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1AC2E10ValueClass(
|
||||
// CHECK: define void @_ZN1AC2E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
|
||||
|
@ -44,10 +44,10 @@ struct B : A {
|
|||
|
||||
B::B(struct Undeclared &ref) : A(ref), mem(1) {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1BC1ER10Undeclared(
|
||||
// CHECK: define void @_ZN1BC1ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
|
||||
// CHECK: call void @_ZN1BC2ER10Undeclared(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1BC2ER10Undeclared(
|
||||
// CHECK: define void @_ZN1BC2ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
|
||||
// CHECK: call void @_ZN1AC2ER10Undeclared(
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
|
@ -64,12 +64,12 @@ struct C : virtual A {
|
|||
};
|
||||
C::C(int x) : A(ValueClass(x, x+1)), mem(x * x) {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1CC1Ei(
|
||||
// CHECK: define void @_ZN1CC1Ei(%struct.C* %this, i32 %x) unnamed_addr
|
||||
// CHECK: call void @_ZN10ValueClassC1Eii(
|
||||
// CHECK: call void @_ZN1AC2E10ValueClass(
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1CC2Ei(
|
||||
// CHECK: define void @_ZN1CC2Ei(%struct.C* %this, i8** %vtt, i32 %x) unnamed_addr
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
|
||||
|
@ -83,12 +83,12 @@ struct D : A {
|
|||
|
||||
D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1DC1Eiz(
|
||||
// CHECK: define void @_ZN1DC1Eiz(%struct.B* %this, i32 %x, ...) unnamed_addr
|
||||
// CHECK: call void @_ZN10ValueClassC1Eii(
|
||||
// CHECK: call void @_ZN1AC2E10ValueClass(
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1DC2Eiz(
|
||||
// CHECK: define void @_ZN1DC2Eiz(%struct.B* %this, i32 %x, ...) unnamed_addr
|
||||
// CHECK: call void @_ZN10ValueClassC1Eii(
|
||||
// CHECK: call void @_ZN1AC2E10ValueClass(
|
||||
// CHECK: call void @_ZN6MemberC1Ei(
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace no_elide_base {
|
|||
Derived(const Other &O);
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE
|
||||
// CHECK: define void @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(%"struct.no_elide_base::Derived"* %this, %"struct.PR8683::A"* %O) unnamed_addr
|
||||
Derived::Derived(const Other &O)
|
||||
// CHECK: call void @_ZNK13no_elide_base5OthercvNS_4BaseEEv
|
||||
// CHECK: call void @_ZN13no_elide_base4BaseC2ERKS0_
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
struct A { virtual void a(); };
|
||||
A x(A& y) { return y; }
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1AC1ERKS_(
|
||||
// CHECK: define linkonce_odr void @_ZN1AC1ERKS_(%struct.A* %this, %struct.A*) unnamed_addr
|
||||
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
|
||||
|
|
|
@ -21,7 +21,7 @@ struct P {
|
|||
};
|
||||
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1XC1ERKS_
|
||||
// CHECK: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X*) unnamed_addr
|
||||
struct X : M, N, P { // ...
|
||||
X() : f1(1.0), d1(2.0), i1(3), name("HELLO"), bf1(0xff), bf2(0xabcd),
|
||||
au_i1(1234), au1_4("MASKED") {}
|
||||
|
@ -136,7 +136,7 @@ void f(B b1) {
|
|||
B b2 = b1;
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN6PR66281BC2ERKS0_
|
||||
// CHECK: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"*) unnamed_addr
|
||||
// CHECK: call void @_ZN6PR66281TC1Ev
|
||||
// CHECK: call void @_ZN6PR66281TC1Ev
|
||||
// CHECK: call void @_ZN6PR66281AC2ERKS0_RKNS_1TES5_
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace test1 {
|
|||
C c;
|
||||
A a;
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN5test11DC2Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN5test11DC2Ev(%"struct.test1::D"* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN5test11BC1Ev(
|
||||
// CHECK-NEXT: call void @_ZN5test11CC1ERKNS_1BE(
|
||||
// CHECK-NEXT: call void @_ZN5test11BD1Ev(
|
||||
|
|
|
@ -42,10 +42,10 @@ struct C {
|
|||
C();
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1CC1Ev(
|
||||
// CHECK: define void @_ZN1CC1Ev(%struct.C* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN1CC2Ev(
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1CC2Ev(
|
||||
// CHECK: define void @_ZN1CC2Ev(%struct.C* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN2A1C1Ev(
|
||||
// CHECK: call void @_ZN2A2C1Ev(
|
||||
// CHECK: call void @_ZN1BC1ERK2A1RK2A2(
|
||||
|
|
|
@ -6,5 +6,5 @@ void a() {
|
|||
B b;
|
||||
}
|
||||
// CHECK: call void @_ZN1BC1Ev
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1BC1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN1AIiEC1Ev
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace test0 {
|
|||
delete a;
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN5test01AD1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN5test01AD1Ev(%class.A* %this) unnamed_addr
|
||||
// CHECK: define linkonce_odr void @_ZN5test01AdlEPv
|
||||
}
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ namespace PR7526 {
|
|||
|
||||
struct allocator_derived : allocator { };
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN6PR75269allocatorD2Ev
|
||||
// CHECK: define void @_ZN6PR75269allocatorD2Ev(%"struct.PR5529::A"* %this) unnamed_addr
|
||||
// CHECK: call void @__cxa_call_unexpected
|
||||
allocator::~allocator() throw() { foo(); }
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN6PR752617allocator_derivedD1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN6PR752617allocator_derivedD1Ev(%"struct.PR5529::A"* %this) unnamed_addr
|
||||
// CHECK-NOT: call void @__cxa_call_unexpected
|
||||
// CHECK: }
|
||||
void foo() {
|
||||
|
@ -93,7 +93,7 @@ namespace test0 {
|
|||
|
||||
// complete destructor alias tested above
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test01AD2Ev
|
||||
// CHECK: define void @_ZN5test01AD2Ev(%"struct.test0::A"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test06MemberD1Ev
|
||||
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
|
||||
// CHECK: invoke void @_ZN5test04BaseD2Ev
|
||||
|
@ -106,7 +106,7 @@ namespace test0 {
|
|||
B::~B() try { } catch (int i) {}
|
||||
// It will suppress the delegation optimization here, though.
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test01BD1Ev
|
||||
// CHECK: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test06MemberD1Ev
|
||||
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
|
||||
// CHECK: invoke void @_ZN5test04BaseD2Ev
|
||||
|
@ -114,7 +114,7 @@ namespace test0 {
|
|||
// CHECK: invoke void @_ZN5test05VBaseD2Ev
|
||||
// CHECK: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test01BD2Ev
|
||||
// CHECK: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test06MemberD1Ev
|
||||
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
|
||||
// CHECK: invoke void @_ZN5test04BaseD2Ev
|
||||
|
@ -142,24 +142,24 @@ namespace test1 {
|
|||
O::~O() {} // alias tested above
|
||||
|
||||
struct P : NonEmpty, A { ~P(); };
|
||||
P::~P() {} // CHECK: define unnamed_addr void @_ZN5test11PD2Ev
|
||||
P::~P() {} // CHECK: define void @_ZN5test11PD2Ev(%"struct.test1::P"* %this) unnamed_addr
|
||||
|
||||
struct Q : A, B { ~Q(); };
|
||||
Q::~Q() {} // CHECK: define unnamed_addr void @_ZN5test11QD2Ev
|
||||
Q::~Q() {} // CHECK: define void @_ZN5test11QD2Ev(%"struct.test1::M"* %this) unnamed_addr
|
||||
|
||||
struct R : A { ~R(); };
|
||||
R::~R() { A a; } // CHECK: define unnamed_addr void @_ZN5test11RD2Ev
|
||||
R::~R() { A a; } // CHECK: define void @_ZN5test11RD2Ev(%"struct.test1::M"* %this) unnamed_addr
|
||||
|
||||
struct S : A { ~S(); int x; };
|
||||
S::~S() {} // alias tested above
|
||||
|
||||
struct T : A { ~T(); B x; };
|
||||
T::~T() {} // CHECK: define unnamed_addr void @_ZN5test11TD2Ev
|
||||
T::~T() {} // CHECK: define void @_ZN5test11TD2Ev(%"struct.test1::T"* %this) unnamed_addr
|
||||
|
||||
// The VTT parameter prevents this. We could still make this work
|
||||
// for calling conventions that are safe against extra parameters.
|
||||
struct U : A, virtual B { ~U(); };
|
||||
U::~U() {} // CHECK: define unnamed_addr void @_ZN5test11UD2Ev
|
||||
U::~U() {} // CHECK: define void @_ZN5test11UD2Ev(%"struct.test1::U"* %this, i8** %vtt) unnamed_addr
|
||||
}
|
||||
|
||||
// PR6471
|
||||
|
@ -168,7 +168,7 @@ namespace test2 {
|
|||
struct B : A { ~B(); };
|
||||
|
||||
B::~B() {}
|
||||
// CHECK: define unnamed_addr void @_ZN5test21BD2Ev
|
||||
// CHECK: define void @_ZN5test21BD2Ev(%"struct.test1::M"* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN5test21AD2Ev
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ namespace test6 {
|
|||
};
|
||||
|
||||
C::C() { opaque(); }
|
||||
// CHECK: define unnamed_addr void @_ZN5test61CC1Ev
|
||||
// CHECK: define void @_ZN5test61CC1Ev(%"struct.test6::C"* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN5test61BILj2EEC2Ev
|
||||
// CHECK: invoke void @_ZN5test61BILj3EEC2Ev
|
||||
// CHECK: invoke void @_ZN5test61BILj0EEC2Ev
|
||||
|
@ -283,7 +283,7 @@ namespace test6 {
|
|||
// FIXME: way too much EH cleanup code follows
|
||||
|
||||
C::~C() { opaque(); }
|
||||
// CHECK: define unnamed_addr void @_ZN5test61CD1Ev
|
||||
// CHECK: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test61CD2Ev
|
||||
// CHECK: invoke void @_ZN5test61BILj3EED2Ev
|
||||
// CHECK: call void @_ZN5test61BILj2EED2Ev
|
||||
|
@ -291,7 +291,7 @@ namespace test6 {
|
|||
// CHECK: invoke void @_ZN5test61BILj3EED2Ev
|
||||
// CHECK: invoke void @_ZN5test61BILj2EED2Ev
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test61CD2Ev
|
||||
// CHECK: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test66opaqueEv
|
||||
// CHECK: invoke void @_ZN5test61AD1Ev
|
||||
// CHECK: invoke void @_ZN5test61AD1Ev
|
||||
|
@ -308,7 +308,7 @@ namespace test6 {
|
|||
|
||||
// Checks from test3:
|
||||
|
||||
// CHECK: define internal unnamed_addr void @_ZN5test312_GLOBAL__N_11DD0Ev(
|
||||
// CHECK: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::<anonymous namespace>::D"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test312_GLOBAL__N_11DD1Ev(
|
||||
// CHECK: call void @_ZdlPv({{.*}}) nounwind
|
||||
// CHECK: ret void
|
||||
|
@ -330,7 +330,7 @@ namespace test6 {
|
|||
// CHECK: call void @_ZN5test312_GLOBAL__N_11DD0Ev(
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define internal unnamed_addr void @_ZN5test312_GLOBAL__N_11CD2Ev(
|
||||
// CHECK: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test31BD2Ev(
|
||||
// CHECK: call void @_ZN5test31AD2Ev(
|
||||
// CHECK: ret void
|
||||
|
@ -338,7 +338,7 @@ namespace test6 {
|
|||
// CHECK: declare void @_ZN5test31BD2Ev(
|
||||
// CHECK: declare void @_ZN5test31AD2Ev(
|
||||
|
||||
// CHECK: define internal unnamed_addr void @_ZN5test312_GLOBAL__N_11CD0Ev(
|
||||
// CHECK: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
|
||||
// CHECK: invoke void @_ZN5test312_GLOBAL__N_11CD1Ev(
|
||||
// CHECK: call void @_ZdlPv({{.*}}) nounwind
|
||||
// CHECK: ret void
|
||||
|
|
|
@ -197,11 +197,11 @@ namespace test9 {
|
|||
|
||||
struct A { A(); };
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test91AC1Ev
|
||||
// CHECK: define void @_ZN5test91AC1Ev(%"struct.test10::A"* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN5test91AC2Ev
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN5test91AC2Ev(
|
||||
// CHECK: define void @_ZN5test91AC2Ev(%"struct.test10::A"* %this) unnamed_addr
|
||||
A::A() try {
|
||||
// CHECK: invoke void @_ZN5test96opaqueEv()
|
||||
opaque();
|
||||
|
|
|
@ -40,7 +40,7 @@ void f(D d) {
|
|||
D d2(d);
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1DC1ERS_
|
||||
// CHECK: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
|
||||
// CHECK: call void @_ZN1AC1Ev
|
||||
// CHECK: call void @_ZN1CC2ERS_1A
|
||||
// CHECK: call void @_ZN1AD1Ev
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
namespace std {
|
||||
struct A { A(); };
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZNSt1AC1Ev
|
||||
// CHECK: define unnamed_addr void @_ZNSt1AC2Ev
|
||||
// CHECK: define void @_ZNSt1AC1Ev(%"struct.N::std::A"* %this) unnamed_addr
|
||||
// CHECK: define void @_ZNSt1AC2Ev(%"struct.N::std::A"* %this) unnamed_addr
|
||||
A::A() { }
|
||||
};
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace test7 {
|
|||
X(U*, typename int_c<(meta<T>::value + meta<U>::value)>::type *) { }
|
||||
};
|
||||
|
||||
// CHECK: define weak_odr unnamed_addr void @_ZN5test71XIiEC1IdEEPT_PNS_5int_cIXplL_ZNS_4metaIiE5valueEEsrNS6_IS3_EE5valueEE4typeE
|
||||
// CHECK: define weak_odr void @_ZN5test71XIiEC1IdEEPT_PNS_5int_cIXplL_ZNS_4metaIiE5valueEEsrNS6_IS3_EE5valueEE4typeE(%"class.test1::T"* %this, double*, float*) unnamed_addr
|
||||
template X<int>::X(double*, float*);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ void test1() {
|
|||
|
||||
|
||||
struct S {
|
||||
// RUN: grep "define linkonce_odr unnamed_addr void @_ZN1SC1Ev" %t
|
||||
// RUN: grep "define linkonce_odr void @_ZN1SC1Ev.*unnamed_addr" %t
|
||||
inline S() { }
|
||||
// RUN: grep "define linkonce_odr unnamed_addr void @_ZN1SC1Ev" %t
|
||||
// RUN: grep "define linkonce_odr void @_ZN1SC1Ev.*unnamed_addr" %t
|
||||
inline ~S() { }
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ struct Foo {
|
|||
Foo::Foo(unsigned arg) : file_id(arg = 42)
|
||||
{ }
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN3FooC2Ej
|
||||
// CHECK: define void @_ZN3FooC2Ej(%struct.Foo* %this, i32 %arg) unnamed_addr
|
||||
// CHECK: [[ARG:%.*]] = alloca i32
|
||||
// CHECK: store i32 42, i32* [[ARG]]
|
||||
// CHECK: store i32 42, i32* %{{.*}}
|
||||
|
|
|
@ -15,8 +15,8 @@ struct B {
|
|||
|
||||
template<typename T> B::B(T) {}
|
||||
|
||||
// CHECK: define weak_odr unnamed_addr void @_ZN1BC1IiEET_(%struct.B* %this, i32)
|
||||
// CHECK: define weak_odr unnamed_addr void @_ZN1BC2IiEET_(%struct.B* %this, i32)
|
||||
// CHECK: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
|
||||
// CHECK: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr
|
||||
template B::B(int);
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -120,7 +120,7 @@ struct A {
|
|||
A();
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN9ValueInit1AC2Ev
|
||||
// CHECK: define void @_ZN9ValueInit1AC2Ev(%"struct.ValueInit::A"* %this) unnamed_addr
|
||||
// CHECK: store i64 -1, i64*
|
||||
// CHECK: ret void
|
||||
A::A() : a() {}
|
||||
|
|
|
@ -29,9 +29,9 @@ void test() {
|
|||
//
|
||||
// BAR's instantiation of X:
|
||||
// CHECK: define internal i32 @"_ZN1XIN1S3$_1EE1fEv"(%struct.X* %this)
|
||||
// CHECK: define internal unnamed_addr void @"_ZN1XIN1S3$_1EEC2ES1_"(%struct.X* %this, i32 %t)
|
||||
// CHECK: define internal void @"_ZN1XIN1S3$_1EEC2ES1_"(%struct.X* %this, i32 %t) unnamed_addr
|
||||
//
|
||||
// FOO's instantiation of X:
|
||||
// CHECK: define internal i32 @"_ZN1XIN1S3$_0EE1fEv"(%struct.X* %this)
|
||||
// CHECK: define internal unnamed_addr void @"_ZN1XIN1S3$_0EEC2ES1_"(%struct.X* %this, i32 %t)
|
||||
// CHECK: define internal void @"_ZN1XIN1S3$_0EEC2ES1_"(%struct.X* %this, i32 %t) unnamed_addr
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// CHECK-NOT: _ZTVN5test31SIiEE
|
||||
// CHECK-NOT: _ZTSN5test31SIiEE
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN5test21CIiEC1Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN5test21CIiEC1Ev(%"class.test2::C"* nocapture %this) unnamed_addr
|
||||
// CHECK: define linkonce_odr void @_ZN5test21CIiE6foobarIdEEvT_(
|
||||
// CHECK: define available_externally void @_ZN5test21CIiE6zedbarEd(
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ template<typename T> void X1<T>::blarg() { }
|
|||
extern template struct X0<char>;
|
||||
extern template struct X1<char>;
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN2X1IcED1Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN2X1IcED1Ev(%struct.X1* %this) unnamed_addr
|
||||
void test_X1() {
|
||||
X1<char> i1c;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ namespace zeroinit {
|
|||
X3<int>().f();
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN8zeroinit2X3IiEC2Ev
|
||||
// CHECK: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%struct.B* %this) unnamed_addr
|
||||
// CHECK: call void @llvm.memset.p0i8.i64
|
||||
// CHECK-NEXT: call void @_ZN8zeroinit2X2IiEC2Ev
|
||||
// CHECK-NEXT: ret void
|
||||
|
|
|
@ -7,4 +7,4 @@ class Foo {
|
|||
};
|
||||
Foo::~Foo() {}
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN3FooD0Ev
|
||||
// CHECK: define void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr
|
||||
|
|
|
@ -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 unnamed_addr void @_ZN14basic_iostreamIcED1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN14basic_iostreamIcED1Ev(%struct.basic_iostream* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN14basic_iostreamIcED2Ev
|
||||
// CHECK: call void @_ZN9basic_iosD2Ev
|
||||
|
||||
// basic_iostream's base dtor calls its non-virtual base dtor.
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN14basic_iostreamIcED2Ev
|
||||
// CHECK: define linkonce_odr void @_ZN14basic_iostreamIcED2Ev(%struct.basic_iostream* %this, i8** %vtt) unnamed_addr
|
||||
// CHECK: call void @_ZN13basic_istreamIcED2Ev
|
||||
// CHECK: }
|
||||
|
||||
// basic_istream's base dtor is a no-op.
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN13basic_istreamIcED2Ev
|
||||
// CHECK: define linkonce_odr void @_ZN13basic_istreamIcED2Ev(%struct.basic_istream* %this, i8** %vtt) unnamed_addr
|
||||
// CHECK-NOT: call
|
||||
// CHECK: }
|
||||
|
||||
// basic_iostream's deleting dtor calls its complete dtor, then
|
||||
// operator delete().
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN14basic_iostreamIcED0Ev
|
||||
// CHECK: define linkonce_odr void @_ZN14basic_iostreamIcED0Ev(%struct.basic_iostream* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN14basic_iostreamIcED1Ev
|
||||
// CHECK: call void @_ZdlPv
|
||||
|
||||
// basic_istream's complete dtor calls the base dtor,
|
||||
// then its virtual base's base dtor.
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN13basic_istreamIcED1Ev
|
||||
// CHECK: define linkonce_odr void @_ZN13basic_istreamIcED1Ev(%struct.basic_istream* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN13basic_istreamIcED2Ev
|
||||
// CHECK: call void @_ZN9basic_iosD2Ev
|
||||
|
||||
// basic_istream's deleting dtor calls the complete dtor, then
|
||||
// operator delete().
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN13basic_istreamIcED0Ev
|
||||
// CHECK: define linkonce_odr void @_ZN13basic_istreamIcED0Ev(%struct.basic_istream* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN13basic_istreamIcED1Ev
|
||||
// CHECK: call void @_ZdlPv
|
||||
|
|
|
@ -5,23 +5,23 @@ struct A {
|
|||
};
|
||||
|
||||
// CHECK: @_ZN1AC1Ev = alias {{.*}} @_ZN1AC2Ev
|
||||
// CHECK: define unnamed_addr void @_ZN1AC2Ev(%struct.A* %this)
|
||||
// CHECK: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
|
||||
A::A() { }
|
||||
|
||||
struct B : virtual A {
|
||||
B();
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1BC1Ev(%struct.B* %this)
|
||||
// CHECK: define unnamed_addr void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt)
|
||||
// CHECK: define void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
|
||||
// CHECK: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt) unnamed_addr
|
||||
B::B() { }
|
||||
|
||||
struct C : virtual A {
|
||||
C(bool);
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1CC1Eb(%struct.B* %this, i1 zeroext)
|
||||
// CHECK: define unnamed_addr void @_ZN1CC2Eb(%struct.B* %this, i8** %vtt, i1 zeroext)
|
||||
// CHECK: define void @_ZN1CC1Eb(%struct.B* %this, i1 zeroext) unnamed_addr
|
||||
// CHECK: define void @_ZN1CC2Eb(%struct.B* %this, i8** %vtt, i1 zeroext) unnamed_addr
|
||||
C::C(bool) { }
|
||||
|
||||
// PR6251
|
||||
|
@ -39,7 +39,7 @@ struct D : B, C {
|
|||
D();
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN6PR62511DC1Ev
|
||||
// CHECK: define void @_ZN6PR62511DC1Ev(%"struct.PR6251::D"* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN6PR62511AIcEC2Ev
|
||||
// CHECK-NOT: call void @_ZN6PR62511AIcEC2Ev
|
||||
// CHECK: ret void
|
||||
|
|
|
@ -21,12 +21,12 @@ struct B : A {
|
|||
// CHECK: @_ZN1CD2Ev = alias bitcast {{.*}} @_ZN1BD2Ev
|
||||
|
||||
// Deleting dtor: defers to the complete dtor.
|
||||
// CHECK: define unnamed_addr void @_ZN1BD0Ev
|
||||
// CHECK: define void @_ZN1BD0Ev(%struct.B* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN1BD1Ev
|
||||
// CHECK: call void @_ZdlPv
|
||||
|
||||
// Base dtor: actually calls A's base dtor.
|
||||
// CHECK: define unnamed_addr void @_ZN1BD2Ev
|
||||
// CHECK: define void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN6MemberD1Ev
|
||||
// CHECK: call void @_ZN1AD2Ev
|
||||
|
||||
|
@ -41,7 +41,7 @@ C::~C() { }
|
|||
// Complete dtor: just an alias (checked above).
|
||||
|
||||
// Deleting dtor: defers to the complete dtor.
|
||||
// CHECK: define unnamed_addr void @_ZN1CD0Ev
|
||||
// CHECK: define void @_ZN1CD0Ev(%struct.C* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN1CD1Ev
|
||||
// CHECK: call void @_ZdlPv
|
||||
|
||||
|
|
|
@ -19,14 +19,14 @@ struct A : Base {
|
|||
Field field;
|
||||
};
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1AC2Ev(
|
||||
// CHECK: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN4BaseC2Ev(
|
||||
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
|
||||
// CHECK: call void @_ZN5FieldC1Ev(
|
||||
// CHECK: ret void
|
||||
A::A() { }
|
||||
|
||||
// CHECK: define unnamed_addr void @_ZN1AD2Ev(
|
||||
// CHECK: define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr
|
||||
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
|
||||
// CHECK: call void @_ZN5FieldD1Ev(
|
||||
// CHECK: call void @_ZN4BaseD2Ev(
|
||||
|
@ -41,16 +41,16 @@ struct B : Base {
|
|||
|
||||
void f() { B b; }
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1BC1Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN1BC1Ev(%struct.A* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN1BC2Ev(
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1BD1Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN1BD1Ev(%struct.A* %this) unnamed_addr
|
||||
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2)
|
||||
// CHECK: call void @_ZN5FieldD1Ev(
|
||||
// CHECK: call void @_ZN4BaseD2Ev(
|
||||
// CHECK: ret void
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1BC2Ev(
|
||||
// CHECK: define linkonce_odr void @_ZN1BC2Ev(%struct.A* %this) unnamed_addr
|
||||
// CHECK: call void @_ZN4BaseC2Ev(
|
||||
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2)
|
||||
// CHECK: call void @_ZN5FieldC1Ev
|
||||
|
|
|
@ -41,7 +41,7 @@ void f(D d) {
|
|||
D d2(d);
|
||||
}
|
||||
|
||||
// CHECK: define linkonce_odr unnamed_addr void @_ZN1DC1ERS_
|
||||
// CHECK: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
|
||||
// CHECK: call void @_ZN1AC1Ev
|
||||
// CHECK: call void @_ZN1CC2ERS_1A
|
||||
// CHECK: call void @_ZN1AD1Ev
|
||||
|
|
Загрузка…
Ссылка в новой задаче