diff --git a/test/CXX/except/except.spec/p14-ir.cpp b/test/CXX/except/except.spec/p14-ir.cpp index 2b8ce65af4..c681727e8c 100644 --- a/test/CXX/except/except.spec/p14-ir.cpp +++ b/test/CXX/except/except.spec/p14-ir.cpp @@ -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 } diff --git a/test/CodeGenCXX/arm.cpp b/test/CodeGenCXX/arm.cpp index 365cd5ae1b..672ca01007 100644 --- a/test/CodeGenCXX/arm.cpp +++ b/test/CodeGenCXX/arm.cpp @@ -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]] diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp index 5e02a72eed..47e3b7b0bb 100644 --- a/test/CodeGenCXX/constructor-init.cpp +++ b/test/CodeGenCXX/constructor-init.cpp @@ -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 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 diff --git a/test/CodeGenCXX/constructors.cpp b/test/CodeGenCXX/constructors.cpp index 8a8eedf5a6..75588ce06c 100644 --- a/test/CodeGenCXX/constructors.cpp +++ b/test/CodeGenCXX/constructors.cpp @@ -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( diff --git a/test/CodeGenCXX/copy-constructor-elim-2.cpp b/test/CodeGenCXX/copy-constructor-elim-2.cpp index 69d004b215..4f4a8e998b 100644 --- a/test/CodeGenCXX/copy-constructor-elim-2.cpp +++ b/test/CodeGenCXX/copy-constructor-elim-2.cpp @@ -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_ diff --git a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp index 406769af91..a5566797d4 100644 --- a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp +++ b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp @@ -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) diff --git a/test/CodeGenCXX/copy-constructor-synthesis.cpp b/test/CodeGenCXX/copy-constructor-synthesis.cpp index 9670e82e82..68f680574b 100644 --- a/test/CodeGenCXX/copy-constructor-synthesis.cpp +++ b/test/CodeGenCXX/copy-constructor-synthesis.cpp @@ -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_ diff --git a/test/CodeGenCXX/default-arg-temps.cpp b/test/CodeGenCXX/default-arg-temps.cpp index 5aeb7af6f7..3d741d5028 100644 --- a/test/CodeGenCXX/default-arg-temps.cpp +++ b/test/CodeGenCXX/default-arg-temps.cpp @@ -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( diff --git a/test/CodeGenCXX/default-arguments.cpp b/test/CodeGenCXX/default-arguments.cpp index fdcf033c6a..6560d3514f 100644 --- a/test/CodeGenCXX/default-arguments.cpp +++ b/test/CodeGenCXX/default-arguments.cpp @@ -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( diff --git a/test/CodeGenCXX/default-constructor-template-member.cpp b/test/CodeGenCXX/default-constructor-template-member.cpp index 284fb20f96..422cc099ad 100644 --- a/test/CodeGenCXX/default-constructor-template-member.cpp +++ b/test/CodeGenCXX/default-constructor-template-member.cpp @@ -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 diff --git a/test/CodeGenCXX/delete.cpp b/test/CodeGenCXX/delete.cpp index 965fbe317e..ddc7bb8dac 100644 --- a/test/CodeGenCXX/delete.cpp +++ b/test/CodeGenCXX/delete.cpp @@ -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 } diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp index 6c61367b2a..0fc23116a5 100644 --- a/test/CodeGenCXX/destructors.cpp +++ b/test/CodeGenCXX/destructors.cpp @@ -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::::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::::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::::C"* %this) unnamed_addr // CHECK: invoke void @_ZN5test312_GLOBAL__N_11CD1Ev( // CHECK: call void @_ZdlPv({{.*}}) nounwind // CHECK: ret void diff --git a/test/CodeGenCXX/eh.cpp b/test/CodeGenCXX/eh.cpp index 1c529ab3f7..03f335f4ec 100644 --- a/test/CodeGenCXX/eh.cpp +++ b/test/CodeGenCXX/eh.cpp @@ -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(); diff --git a/test/CodeGenCXX/implicit-copy-constructor.cpp b/test/CodeGenCXX/implicit-copy-constructor.cpp index adc5ae5fb2..500860182e 100644 --- a/test/CodeGenCXX/implicit-copy-constructor.cpp +++ b/test/CodeGenCXX/implicit-copy-constructor.cpp @@ -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 diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp index 45d1215d70..2b570ed202 100644 --- a/test/CodeGenCXX/mangle-subst-std.cpp +++ b/test/CodeGenCXX/mangle-subst-std.cpp @@ -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() { } }; diff --git a/test/CodeGenCXX/mangle-template.cpp b/test/CodeGenCXX/mangle-template.cpp index 19151f01be..463f15dc4a 100644 --- a/test/CodeGenCXX/mangle-template.cpp +++ b/test/CodeGenCXX/mangle-template.cpp @@ -82,7 +82,7 @@ namespace test7 { X(U*, typename int_c<(meta::value + meta::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::X(double*, float*); } diff --git a/test/CodeGenCXX/member-functions.cpp b/test/CodeGenCXX/member-functions.cpp index 331b7f0ebb..b95763c0ff 100644 --- a/test/CodeGenCXX/member-functions.cpp +++ b/test/CodeGenCXX/member-functions.cpp @@ -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() { } diff --git a/test/CodeGenCXX/member-init-assignment.cpp b/test/CodeGenCXX/member-init-assignment.cpp index ce19e5c4fc..128cb888f3 100644 --- a/test/CodeGenCXX/member-init-assignment.cpp +++ b/test/CodeGenCXX/member-init-assignment.cpp @@ -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* %{{.*}} diff --git a/test/CodeGenCXX/member-templates.cpp b/test/CodeGenCXX/member-templates.cpp index 4305164765..7e4bdca77f 100644 --- a/test/CodeGenCXX/member-templates.cpp +++ b/test/CodeGenCXX/member-templates.cpp @@ -15,8 +15,8 @@ struct B { template 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 diff --git a/test/CodeGenCXX/pointers-to-data-members.cpp b/test/CodeGenCXX/pointers-to-data-members.cpp index 0029659ed3..6acccbaab9 100644 --- a/test/CodeGenCXX/pointers-to-data-members.cpp +++ b/test/CodeGenCXX/pointers-to-data-members.cpp @@ -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() {} diff --git a/test/CodeGenCXX/template-anonymous-types.cpp b/test/CodeGenCXX/template-anonymous-types.cpp index a7567792b0..68bdc0c4a4 100644 --- a/test/CodeGenCXX/template-anonymous-types.cpp +++ b/test/CodeGenCXX/template-anonymous-types.cpp @@ -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 } diff --git a/test/CodeGenCXX/template-instantiation.cpp b/test/CodeGenCXX/template-instantiation.cpp index 1ccf24fee4..635e1d2099 100644 --- a/test/CodeGenCXX/template-instantiation.cpp +++ b/test/CodeGenCXX/template-instantiation.cpp @@ -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( diff --git a/test/CodeGenCXX/template-linkage.cpp b/test/CodeGenCXX/template-linkage.cpp index ae0a6bd801..20508c1596 100644 --- a/test/CodeGenCXX/template-linkage.cpp +++ b/test/CodeGenCXX/template-linkage.cpp @@ -37,7 +37,7 @@ template void X1::blarg() { } extern template struct X0; extern template struct X1; -// CHECK: define linkonce_odr unnamed_addr void @_ZN2X1IcED1Ev( +// CHECK: define linkonce_odr void @_ZN2X1IcED1Ev(%struct.X1* %this) unnamed_addr void test_X1() { X1 i1c; } diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp index a0dbf0e610..258d6926e1 100644 --- a/test/CodeGenCXX/value-init.cpp +++ b/test/CodeGenCXX/value-init.cpp @@ -133,7 +133,7 @@ namespace zeroinit { X3().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 diff --git a/test/CodeGenCXX/virt-dtor-gen.cpp b/test/CodeGenCXX/virt-dtor-gen.cpp index cb418f856f..1a6c583c34 100644 --- a/test/CodeGenCXX/virt-dtor-gen.cpp +++ b/test/CodeGenCXX/virt-dtor-gen.cpp @@ -7,4 +7,4 @@ class Foo { }; Foo::~Foo() {} -// CHECK: define unnamed_addr void @_ZN3FooD0Ev +// CHECK: define void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr diff --git a/test/CodeGenCXX/virtual-base-destructor-call.cpp b/test/CodeGenCXX/virtual-base-destructor-call.cpp index a22be43289..807eaff0d1 100644 --- a/test/CodeGenCXX/virtual-base-destructor-call.cpp +++ b/test/CodeGenCXX/virtual-base-destructor-call.cpp @@ -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 diff --git a/test/CodeGenCXX/virtual-bases.cpp b/test/CodeGenCXX/virtual-bases.cpp index 21f38133cb..cfb4c83716 100644 --- a/test/CodeGenCXX/virtual-bases.cpp +++ b/test/CodeGenCXX/virtual-bases.cpp @@ -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 diff --git a/test/CodeGenCXX/virtual-destructor-calls.cpp b/test/CodeGenCXX/virtual-destructor-calls.cpp index 501f760cb9..1cc8bcc775 100644 --- a/test/CodeGenCXX/virtual-destructor-calls.cpp +++ b/test/CodeGenCXX/virtual-destructor-calls.cpp @@ -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 diff --git a/test/CodeGenCXX/vtable-pointer-initialization.cpp b/test/CodeGenCXX/vtable-pointer-initialization.cpp index c0d7d822d3..f629c2db79 100644 --- a/test/CodeGenCXX/vtable-pointer-initialization.cpp +++ b/test/CodeGenCXX/vtable-pointer-initialization.cpp @@ -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 diff --git a/test/CodeGenObjCXX/implicit-copy-constructor.mm b/test/CodeGenObjCXX/implicit-copy-constructor.mm index d9ed55f084..10eb644ddb 100644 --- a/test/CodeGenObjCXX/implicit-copy-constructor.mm +++ b/test/CodeGenObjCXX/implicit-copy-constructor.mm @@ -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