summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CodeGenModule.cpp40
-rw-r--r--test/CXX/except/except.spec/p14-ir.cpp8
-rw-r--r--test/CXX/special/class.copy/p15-inclass.cpp10
-rw-r--r--test/CodeGen/2009-01-05-BlockInlining.c4
-rw-r--r--test/CodeGen/inline.c6
-rw-r--r--test/CodeGenCXX/catch-undef-behavior.cpp4
-rw-r--r--test/CodeGenCXX/constructor-init.cpp20
-rw-r--r--test/CodeGenCXX/constructor-template.cpp4
-rw-r--r--test/CodeGenCXX/copy-constructor-synthesis.cpp24
-rw-r--r--test/CodeGenCXX/cxx1y-init-captures.cpp7
-rw-r--r--test/CodeGenCXX/debug-info-template-member.cpp2
-rw-r--r--test/CodeGenCXX/debug-lambda-expressions.cpp33
-rw-r--r--test/CodeGenCXX/destructors.cpp17
-rw-r--r--test/CodeGenCXX/inheriting-constructor.cpp6
-rw-r--r--test/CodeGenCXX/key-function-vtable.cpp4
-rw-r--r--test/CodeGenCXX/lambda-expressions-nested-linkage.cpp13
-rw-r--r--test/CodeGenCXX/lambda-expressions.cpp18
-rw-r--r--test/CodeGenCXX/mangle-abi-examples.cpp2
-rw-r--r--test/CodeGenCXX/mangle-lambdas.cpp67
-rw-r--r--test/CodeGenCXX/mangle-local-class-vtables.cpp28
-rw-r--r--test/CodeGenCXX/mangle-local-classes-nested.cpp4
-rw-r--r--test/CodeGenCXX/mangle-ms-abi-examples.cpp2
-rw-r--r--test/CodeGenCXX/mangle-subst-std.cpp5
-rw-r--r--test/CodeGenCXX/member-functions.cpp5
-rw-r--r--test/CodeGenCXX/member-init-anon-union.cpp26
-rw-r--r--test/CodeGenCXX/microsoft-abi-methods.cpp6
-rw-r--r--test/CodeGenCXX/microsoft-abi-vftables.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-interface.cpp6
-rw-r--r--test/CodeGenCXX/pod-member-memcpys.cpp101
-rw-r--r--test/CodeGenCXX/rtti-linkage.cpp8
-rw-r--r--test/CodeGenCXX/static-init.cpp2
-rw-r--r--test/CodeGenCXX/static-local-in-local-class.cpp8
-rw-r--r--test/CodeGenCXX/template-anonymous-types.cpp11
-rw-r--r--test/CodeGenCXX/thunks.cpp8
-rw-r--r--test/CodeGenCXX/virtual-base-destructor-call.cpp10
-rw-r--r--test/CodeGenCXX/visibility.cpp21
-rw-r--r--test/CodeGenCXX/vla-lambda-capturing.cpp18
-rw-r--r--test/CodeGenCXX/vtable-pointer-initialization.cpp12
-rw-r--r--test/CodeGenCXX/vtt-layout.cpp4
-rw-r--r--test/CodeGenObjCXX/arc-special-member-functions.mm70
-rw-r--r--test/CodeGenObjCXX/destroy.mm4
-rw-r--r--test/CodeGenObjCXX/lambda-expressions.mm3
-rw-r--r--test/CodeGenObjCXX/mangle-blocks.mm2
-rw-r--r--test/Modules/cxx-irgen.cpp22
-rw-r--r--test/Modules/templates-2.mm12
-rw-r--r--test/SemaCXX/linkage.cpp2
46 files changed, 357 insertions, 334 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 0c8d4f65f0..c710b5bdad 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1084,24 +1084,28 @@ void CodeGenModule::EmitDeferred() {
// previously unused static decl may become used during the generation of code
// for a static function, iterate until no changes are made.
- while (true) {
- if (!DeferredVTables.empty()) {
- EmitDeferredVTables();
-
- // Emitting a v-table doesn't directly cause more v-tables to
- // become deferred, although it can cause functions to be
- // emitted that then need those v-tables.
- assert(DeferredVTables.empty());
- }
+ if (!DeferredVTables.empty()) {
+ EmitDeferredVTables();
- // Stop if we're out of both deferred v-tables and deferred declarations.
- if (DeferredDeclsToEmit.empty())
- break;
+ // Emitting a v-table doesn't directly cause more v-tables to
+ // become deferred, although it can cause functions to be
+ // emitted that then need those v-tables.
+ assert(DeferredVTables.empty());
+ }
+
+ // Stop if we're out of both deferred v-tables and deferred declarations.
+ if (DeferredDeclsToEmit.empty())
+ return;
+
+ // Grab the list of decls to emit. If EmitGlobalDefinition schedules more
+ // work, it will not interfere with this.
+ std::vector<DeferredGlobal> CurDeclsToEmit;
+ CurDeclsToEmit.swap(DeferredDeclsToEmit);
- DeferredGlobal &G = DeferredDeclsToEmit.back();
+ for (DeferredGlobal &G : CurDeclsToEmit) {
GlobalDecl D = G.GD;
llvm::GlobalValue *GV = G.GV;
- DeferredDeclsToEmit.pop_back();
+ G.GV = nullptr;
assert(!GV || GV == GetGlobalValue(getMangledName(D)));
if (!GV)
@@ -1118,6 +1122,14 @@ void CodeGenModule::EmitDeferred() {
// Otherwise, emit the definition and move on to the next one.
EmitGlobalDefinition(D, GV);
+
+ // If we found out that we need to emit more decls, do that recursively.
+ // This has the advantage that the decls are emitted in a DFS and related
+ // ones are close together, which is convenient for testing.
+ if (!DeferredVTables.empty() || !DeferredDeclsToEmit.empty()) {
+ EmitDeferred();
+ assert(DeferredVTables.empty() && DeferredDeclsToEmit.empty());
+ }
}
}
diff --git a/test/CXX/except/except.spec/p14-ir.cpp b/test/CXX/except/except.spec/p14-ir.cpp
index e3b15e5bde..af1d9a4425 100644
--- a/test/CXX/except/except.spec/p14-ir.cpp
+++ b/test/CXX/except/except.spec/p14-ir.cpp
@@ -66,16 +66,16 @@ void test() {
// CHECK-NEXT: ret void
X9();
+ // CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X8* %this) unnamed_addr
+ // CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]]
+ // CHECK-NEXT: ret void
+
// CHECK: define linkonce_odr void @_ZN2X9C2Ev(%struct.X9* %this) unnamed_addr
// CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]]
// FIXME: and here:
// CHECK-NEXT: bitcast
// CHECK-NEXT: call void @_ZN2X7C2Ev({{.*}})
// CHECK: ret void
-
- // CHECK: define linkonce_odr void @_ZN2X8C2Ev(%struct.X8* %this) unnamed_addr
- // CHECK: call void @_ZN2X6C2Ev({{.*}}) [[NUW]]
- // CHECK-NEXT: ret void
}
// CHECK: attributes [[NUW]] = { nounwind{{.*}} }
diff --git a/test/CXX/special/class.copy/p15-inclass.cpp b/test/CXX/special/class.copy/p15-inclass.cpp
index 6cfa94fafa..ca14f71f38 100644
--- a/test/CXX/special/class.copy/p15-inclass.cpp
+++ b/test/CXX/special/class.copy/p15-inclass.cpp
@@ -20,19 +20,19 @@ namespace PR11418 {
X x3(static_cast<X&&>(x));
}
- // CHECK: define linkonce_odr void @_ZN7PR114181XC2EOS0_
+ // CHECK: define linkonce_odr void @_ZN7PR114181XC2ERKS0_
// CHECK-NOT: 17
- // CHECK: call void @_ZN7PR114186NonPODC1EOS0_
+ // CHECK: call void @_ZN7PR114186NonPODC1ERKS0_
// CHECK-NOT: 17
- // CHECK: load i32*
+ // CHECK: load i32*
// CHECK-NOT: 17
// CHECK: store i32
// CHECK-NOT: 17
// CHECK: ret
- // CHECK: define linkonce_odr void @_ZN7PR114181XC2ERKS0_
+ // CHECK: define linkonce_odr void @_ZN7PR114181XC2EOS0_
// CHECK-NOT: 17
- // CHECK: call void @_ZN7PR114186NonPODC1ERKS0_
+ // CHECK: call void @_ZN7PR114186NonPODC1EOS0_
// CHECK-NOT: 17
// CHECK: load i32*
// CHECK-NOT: 17
diff --git a/test/CodeGen/2009-01-05-BlockInlining.c b/test/CodeGen/2009-01-05-BlockInlining.c
index 2ae9b70bb8..9153771f3a 100644
--- a/test/CodeGen/2009-01-05-BlockInlining.c
+++ b/test/CodeGen/2009-01-05-BlockInlining.c
@@ -5,8 +5,8 @@
// and block literals are internal constants.
// CHECK: @__block_descriptor_tmp = internal constant
// CHECK: @__block_literal_global = internal constant
-// CHECK: @__block_descriptor_tmp1 = internal constant
-// CHECK: @__block_literal_global2 = internal constant
+// CHECK: @__block_descriptor_tmp2 = internal constant
+// CHECK: @__block_literal_global3 = internal constant
static int fun(int x) {
return x+1;
}
diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c
index 96c9a86bae..612f17c80e 100644
--- a/test/CodeGen/inline.c
+++ b/test/CodeGen/inline.c
@@ -17,8 +17,8 @@
// CHECK1-LABEL: define void @testA
// CHECK1-LABEL: define void @testB
// CHECK1-LABEL: define void @testC
-// CHECK1-LABEL: define available_externally void @gnu_ei_inline()
// CHECK1-LABEL: define available_externally i32 @ei()
+// CHECK1-LABEL: define available_externally void @gnu_ei_inline()
// RUN: echo "C99 tests:"
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-optzns -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
@@ -39,8 +39,8 @@
// CHECK2-LABEL: define void @testA
// CHECK2-LABEL: define void @testB
// CHECK2-LABEL: define void @testC
-// CHECK2-LABEL: define available_externally void @gnu_ei_inline()
// CHECK2-LABEL: define available_externally i32 @foo()
+// CHECK2-LABEL: define available_externally void @gnu_ei_inline()
// RUN: echo "C++ tests:"
// RUN: %clang_cc1 -x c++ %s -triple i386-unknown-unknown -O1 -disable-llvm-optzns -emit-llvm -o - -std=c++98 | FileCheck %s --check-prefix=CHECK3
@@ -58,8 +58,8 @@
// CHECK4-NOT: unreferenced1
// CHECK4-LABEL: define weak_odr void @unreferenced2()
// CHECK4-LABEL: define void @gnu_inline()
-// CHECK4-LABEL: define available_externally void @gnu_ei_inline()
// CHECK4-LABEL: define linkonce_odr i32 @foo()
+// CHECK4-LABEL: define available_externally void @gnu_ei_inline()
extern __inline int ei() { return 123; }
diff --git a/test/CodeGenCXX/catch-undef-behavior.cpp b/test/CodeGenCXX/catch-undef-behavior.cpp
index 4120d0fead..518df59227 100644
--- a/test/CodeGenCXX/catch-undef-behavior.cpp
+++ b/test/CodeGenCXX/catch-undef-behavior.cpp
@@ -446,11 +446,11 @@ namespace CopyValueRepresentation {
// CHECK-NOT: call {{.*}} @__ubsan_handle_load_invalid_value
// CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S4aSEOS0_
// CHECK-NOT: call {{.*}} @__ubsan_handle_load_invalid_value
- // CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S5C2ERKS0_
+ // CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S1C2ERKS0_
// CHECK-NOT: call {{.*}} __ubsan_handle_load_invalid_value
// CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S2C2ERKS0_
// CHECK: __ubsan_handle_load_invalid_value
- // CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S1C2ERKS0_
+ // CHECK-LABEL: define {{.*}} @_ZN23CopyValueRepresentation2S5C2ERKS0_
// CHECK-NOT: call {{.*}} __ubsan_handle_load_invalid_value
struct CustomCopy { CustomCopy(); CustomCopy(const CustomCopy&); };
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp
index 9d029a3696..e10b371dd2 100644
--- a/test/CodeGenCXX/constructor-init.cpp
+++ b/test/CodeGenCXX/constructor-init.cpp
@@ -200,33 +200,35 @@ namespace PR10720 {
// CHECK-PR10720: ret
pair2 &operator=(pair2&&) = default;
- // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2EOS0_
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107204pairC2ERKS0_
+ // CHECK-PR10720-NOT: ret
+ // CHECK-PR10720: call void @llvm.memcpy
+ // CHECK-PR10720-NEXT: ret void
+
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2ERKS0_
// CHECK-PR10720-NOT: ret
// CHECK-PR10720: load
// CHECK-PR10720: icmp ult
// CHECK-PR10720-NEXT: br i1
- // CHECK-PR10720: call void @_ZN7PR107201XC1EOS0_
+ // CHECK-PR10720: call void @_ZN7PR107201XC1ERKS0_
// CHECK-PR10720-NEXT: br label
// CHECK-PR10720: ret void
- pair2(pair2&&) = default;
- // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2ERKS0_
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2EOS0_
// CHECK-PR10720-NOT: ret
// CHECK-PR10720: load
// CHECK-PR10720: icmp ult
// CHECK-PR10720-NEXT: br i1
- // CHECK-PR10720: call void @_ZN7PR107201XC1ERKS0_
+ // CHECK-PR10720: call void @_ZN7PR107201XC1EOS0_
// CHECK-PR10720-NEXT: br label
// CHECK-PR10720: ret void
+ pair2(pair2&&) = default;
+
pair2(const pair2&) = default;
};
struct pair : X { // Make the copy constructor non-trivial, so we actually generate it.
int second[4];
- // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107204pairC2ERKS0_
- // CHECK-PR10720-NOT: ret
- // CHECK-PR10720: call void @llvm.memcpy
- // CHECK-PR10720-NEXT: ret void
pair(const pair&) = default;
};
diff --git a/test/CodeGenCXX/constructor-template.cpp b/test/CodeGenCXX/constructor-template.cpp
index 675e3cfc0a..d1ae094a3b 100644
--- a/test/CodeGenCXX/constructor-template.cpp
+++ b/test/CodeGenCXX/constructor-template.cpp
@@ -45,10 +45,10 @@ int main() {
delete node;
}
+// CHECK-LP64: __ZN4ListIP12BinomialNodeIiEED1Ev:
// CHECK-LP64: __ZN4NodeIP12BinomialNodeIiEEC2Ev:
// CHECK-LP64: __ZN4ListIP12BinomialNodeIiEEC1Ev:
-// CHECK-LP64: __ZN4ListIP12BinomialNodeIiEED1Ev:
+// CHECK-LP32: __ZN4ListIP12BinomialNodeIiEED1Ev:
// CHECK-LP32: __ZN4NodeIP12BinomialNodeIiEEC2Ev:
// CHECK-LP32: __ZN4ListIP12BinomialNodeIiEEC1Ev:
-// CHECK-LP32: __ZN4ListIP12BinomialNodeIiEED1Ev:
diff --git a/test/CodeGenCXX/copy-constructor-synthesis.cpp b/test/CodeGenCXX/copy-constructor-synthesis.cpp
index abbb7d0535..30178a073b 100644
--- a/test/CodeGenCXX/copy-constructor-synthesis.cpp
+++ b/test/CodeGenCXX/copy-constructor-synthesis.cpp
@@ -146,18 +146,6 @@ void f(B b1) {
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret [[A]]* [[THIS]]
-// CHECK-LABEL: define linkonce_odr void @_ZN12rdar138169401AC2ERKS0_(
-// CHECK: [[THIS:%.*]] = load [[A]]**
-// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[THIS]] to i32 (...)***
-// CHECK-NEXT: store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*]* @_ZTVN12rdar138169401AE, i64 0, i64 2) to i32 (...)**), i32 (...)*** [[T0]]
-// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 1
-// CHECK-NEXT: [[OTHER:%.*]] = load [[A]]**
-// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]]* [[OTHER]], i32 0, i32 1
-// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T0]] to i8*
-// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T2]] to i8*
-// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
-// CHECK-NEXT: ret void
-
// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281TC1Ev
@@ -174,6 +162,18 @@ void f(B b1) {
// CHECK: call void @_ZN6PR66281AC1ERKS0_RKNS_1TES5_
// CHECK: call void @_ZN6PR66281TD1Ev
// CHECK: call void @_ZN6PR66281TD1Ev
+
+// CHECK-LABEL: define linkonce_odr void @_ZN12rdar138169401AC2ERKS0_(
+// CHECK: [[THIS:%.*]] = load [[A]]**
+// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[THIS]] to i32 (...)***
+// CHECK-NEXT: store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*]* @_ZTVN12rdar138169401AE, i64 0, i64 2) to i32 (...)**), i32 (...)*** [[T0]]
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 1
+// CHECK-NEXT: [[OTHER:%.*]] = load [[A]]**
+// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]]* [[OTHER]], i32 0, i32 1
+// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T0]] to i8*
+// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T2]] to i8*
+// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
+// CHECK-NEXT: ret void
}
// rdar://13816940
diff --git a/test/CodeGenCXX/cxx1y-init-captures.cpp b/test/CodeGenCXX/cxx1y-init-captures.cpp
index a60269f3b1..c81b5922d4 100644
--- a/test/CodeGenCXX/cxx1y-init-captures.cpp
+++ b/test/CodeGenCXX/cxx1y-init-captures.cpp
@@ -35,6 +35,7 @@ void g() {
// CHECK: load i32*
// CHECK: getelementptr inbounds {{.*}}, i32 0, i32 1
// CHECK: load i32*
+
// CHECK: add nsw i32
int h(int a) {
@@ -74,6 +75,9 @@ int h(int a) {
//
// CHECK: call i32 @"_ZZZ1hiENK3$_2clEvENKUlvE_clEv"({{.*}}* %[[INNER]])
return [=, &c] {
+ // CHECK-LABEL: define internal void @"_ZZ1fvEN3$_0D2Ev"(
+ // CHECK: call void @_ZN1SD1Ev(
+
// CHECK-LABEL: define internal i32 @"_ZZZ1hiENK3$_2clEvENKUlvE_clEv"(
// CHECK: %[[INNER_ADDR:.*]] = alloca
// CHECK: store {{.*}}, {{.*}}** %[[INNER_ADDR]],
@@ -97,6 +101,3 @@ int h(int a) {
// Ensure we can emit code for init-captures in global lambdas too.
auto global_lambda = [a = 0] () mutable { return ++a; };
int get_incremented() { return global_lambda(); }
-
-// CHECK-LABEL: define internal void @"_ZZ1fvEN3$_0D2Ev"(
-// CHECK: call void @_ZN1SD1Ev(
diff --git a/test/CodeGenCXX/debug-info-template-member.cpp b/test/CodeGenCXX/debug-info-template-member.cpp
index 300b6dbacc..c1d9f6742d 100644
--- a/test/CodeGenCXX/debug-info-template-member.cpp
+++ b/test/CodeGenCXX/debug-info-template-member.cpp
@@ -42,8 +42,8 @@ inline int add3(int x) {
// didn't appear in the class's member list (C_MEM). This prevents the functions
// from being added to type units, while still appearing in the type
// declaration/reference in the compile unit.
-// CHECK: !"_ZTS7MyClass", {{.*}} ; [ DW_TAG_subprogram ] [line 4] [add<2>]
// CHECK: !"_ZTS7MyClass", {{.*}} ; [ DW_TAG_subprogram ] [line 0] [MyClass]
+// CHECK: !"_ZTS7MyClass", {{.*}} ; [ DW_TAG_subprogram ] [line 4] [add<2>]
template<typename T>
struct outer {
diff --git a/test/CodeGenCXX/debug-lambda-expressions.cpp b/test/CodeGenCXX/debug-lambda-expressions.cpp
index feafcff064..ac84036f13 100644
--- a/test/CodeGenCXX/debug-lambda-expressions.cpp
+++ b/test/CodeGenCXX/debug-lambda-expressions.cpp
@@ -29,13 +29,17 @@ int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
// D: 18
// CHECK: [[D_FUNC:.*]] = {{.*}} [ DW_TAG_subprogram ] [line [[D_LINE:.*]]] [def] [d]
-// Back to D. -- 24
-// CHECK: [[LAM_D:.*]] = {{.*}}, [[D_FUNC]], {{.*}}, [[LAM_D_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[D_LINE]],
-// CHECK: [[LAM_D_ARGS]] = !{[[CAP_D_X:.*]], [[CAP_D_Y:.*]], [[CON_LAM_D:.*]]}
-// CHECK: [[CAP_D_X]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_member ] [x] [line [[D_LINE]],
-// CHECK: [[CAP_D_Y]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_member ] [y] [line [[D_LINE]],
-// CHECK: [[CON_LAM_D]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_subprogram ] [line [[D_LINE]]] [public] [operator()]
+// Back to A. -- 78
+// CHECK: [[LAM_A:.*]] = {{.*}}, [[A_FUNC]], {{.*}}, [[LAM_A_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[A_LINE]],
+// CHECK: [[LAM_A_ARGS]] = !{[[CON_LAM_A:.*]]}
+// CHECK: [[CON_LAM_A]] = {{.*}}, [[LAM_A]], {{.*}} [ DW_TAG_subprogram ] [line [[A_LINE]]] [public] [operator()]
+
+// Back to B. -- 67
+// CHECK: [[LAM_B:.*]] = {{.*}}, [[B_FUNC]], {{.*}}, [[LAM_B_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[B_LINE]],
+// CHECK: [[LAM_B_ARGS]] = !{[[CAP_B:.*]], [[CON_LAM_B:.*]]}
+// CHECK: [[CAP_B]] = {{.*}}, [[LAM_B]], {{.*}}} ; [ DW_TAG_member ] [x] [line [[B_LINE]],
+// CHECK: [[CON_LAM_B]] = {{.*}}, [[LAM_B]], {{.*}} [ DW_TAG_subprogram ] [line [[B_LINE]]] [public] [operator()]
// Back to C. -- 55
// CHECK: [[LAM_C:.*]] = {{.*}}, [[C_FUNC]], {{.*}}, [[LAM_C_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[C_LINE]],
@@ -44,17 +48,12 @@ int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
// CHECK: [[CAP_C]] = {{.*}}, [[LAM_C]], {{.*}}} ; [ DW_TAG_member ] [x] [line [[C_LINE]],
// CHECK: [[CON_LAM_C]] = {{.*}}, [[LAM_C]], {{.*}} [ DW_TAG_subprogram ] [line [[C_LINE]]] [public] [operator()]
-
-// Back to B. -- 67
-// CHECK: [[LAM_B:.*]] = {{.*}}, [[B_FUNC]], {{.*}}, [[LAM_B_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[B_LINE]],
-// CHECK: [[LAM_B_ARGS]] = !{[[CAP_B:.*]], [[CON_LAM_B:.*]]}
-// CHECK: [[CAP_B]] = {{.*}}, [[LAM_B]], {{.*}}} ; [ DW_TAG_member ] [x] [line [[B_LINE]],
-// CHECK: [[CON_LAM_B]] = {{.*}}, [[LAM_B]], {{.*}} [ DW_TAG_subprogram ] [line [[B_LINE]]] [public] [operator()]
-
-// Back to A. -- 78
-// CHECK: [[LAM_A:.*]] = {{.*}}, [[A_FUNC]], {{.*}}, [[LAM_A_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[A_LINE]],
-// CHECK: [[LAM_A_ARGS]] = !{[[CON_LAM_A:.*]]}
-// CHECK: [[CON_LAM_A]] = {{.*}}, [[LAM_A]], {{.*}} [ DW_TAG_subprogram ] [line [[A_LINE]]] [public] [operator()]
+// Back to D. -- 24
+// CHECK: [[LAM_D:.*]] = {{.*}}, [[D_FUNC]], {{.*}}, [[LAM_D_ARGS:.*]], null, null, null} ; [ DW_TAG_class_type ] [line [[D_LINE]],
+// CHECK: [[LAM_D_ARGS]] = !{[[CAP_D_X:.*]], [[CAP_D_Y:.*]], [[CON_LAM_D:.*]]}
+// CHECK: [[CAP_D_X]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_member ] [x] [line [[D_LINE]],
+// CHECK: [[CAP_D_Y]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_member ] [y] [line [[D_LINE]],
+// CHECK: [[CON_LAM_D]] = {{.*}}, [[LAM_D]], {{.*}} [ DW_TAG_subprogram ] [line [[D_LINE]]] [public] [operator()]
// CVAR:
// CHECK: {{.*}} [[CVAR_T:![0-9]*]], {{.*}} ; [ DW_TAG_variable ] [cvar] [line [[CVAR_LINE:[0-9]*]]]
diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp
index bc9a683be5..1f05caee16 100644
--- a/test/CodeGenCXX/destructors.cpp
+++ b/test/CodeGenCXX/destructors.cpp
@@ -185,6 +185,11 @@ namespace test3 {
new D; // Force emission of D's vtable
}
+ // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
+ // CHECK4: invoke void @_ZN5test31BD2Ev(
+ // CHECK4: call void @_ZN5test31AD2Ev(
+ // CHECK4: ret void
+
// CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::(anonymous namespace)::D"* %this) unnamed_addr
// CHECK4: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
// CHECK4: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]]
@@ -204,15 +209,6 @@ namespace test3 {
// CHECK4: call void @_ZN5test312_GLOBAL__N_11DD0Ev(
// CHECK4: ret void
- // CHECK4-LABEL: declare void @_ZN5test31BD2Ev(
- // CHECK4-LABEL: declare void @_ZN5test31AD2Ev(
-
- // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
- // CHECK4: invoke void @_ZN5test31BD2Ev(
- // CHECK4: call void @_ZN5test31AD2Ev(
- // CHECK4: ret void
-
-
// CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
// CHECK4: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev(
// CHECK4: call void @_ZdlPv({{.*}}) [[NUW]]
@@ -232,6 +228,9 @@ namespace test3 {
// CHECK4: call void @_ZN5test312_GLOBAL__N_11CD0Ev(
// CHECK4: ret void
+ // CHECK4-LABEL: declare void @_ZN5test31BD2Ev(
+ // CHECK4-LABEL: declare void @_ZN5test31AD2Ev(
+
// CHECK4: attributes [[NUW]] = {{[{].*}} nounwind {{.*[}]}}
}
diff --git a/test/CodeGenCXX/inheriting-constructor.cpp b/test/CodeGenCXX/inheriting-constructor.cpp
index 9394137e64..42080a2daf 100644
--- a/test/CodeGenCXX/inheriting-constructor.cpp
+++ b/test/CodeGenCXX/inheriting-constructor.cpp
@@ -21,8 +21,8 @@ D d(123);
// CHECK-LABEL: define linkonce_odr void @_ZN1DC1IiEET_(
// CHECK: call void @_ZN1DC2IiEET_(
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC2IiEET_(
-// CHECK: call void @_ZN1CC2IiEET_(
-
// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ei(
// CHECK: call void @_ZN1AC2Ei(
+
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC2IiEET_(
+// CHECK: call void @_ZN1CC2IiEET_(
diff --git a/test/CodeGenCXX/key-function-vtable.cpp b/test/CodeGenCXX/key-function-vtable.cpp
index 0ecd898058..c443b5277e 100644
--- a/test/CodeGenCXX/key-function-vtable.cpp
+++ b/test/CodeGenCXX/key-function-vtable.cpp
@@ -48,6 +48,6 @@ void use_X1(X1 *x1) { x1->f(); }
// CHECK: @_ZTV2X1 = linkonce_odr unnamed_addr constant
// CHECK: @_ZTV5testa = unnamed_addr constant [3 x i8*] [i8* null
// CHECK: @_ZTV5testc = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTV5teste = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
// CHECK: @_ZTV5testb = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
+// CHECK: @_ZTV5teste = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
+// CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant [3 x i8*] [i8* null
diff --git a/test/CodeGenCXX/lambda-expressions-nested-linkage.cpp b/test/CodeGenCXX/lambda-expressions-nested-linkage.cpp
index b25019d180..9a449874cb 100644
--- a/test/CodeGenCXX/lambda-expressions-nested-linkage.cpp
+++ b/test/CodeGenCXX/lambda-expressions-nested-linkage.cpp
@@ -30,6 +30,14 @@ L<int> l;
}
// CHECK-LABEL: define linkonce_odr i32 @_ZN15inline_function3fooEv
+
+// CHECK-LABEL: define linkonce_odr void @_ZNK12non_template1L1tMUliE_clEi(%class.anon
+// CHECK-LABEL: define linkonce_odr i32 @_ZZNK12non_template1L1tMUliE_clEiENKUliE_clEi(%class.anon
+
+
+// CHECK-LABEL: define linkonce_odr void @_ZNK32lambdas_in_NSDMIs_template_class1LIiEUliE_clEi(%class.anon
+// CHECK-LABEL: define linkonce_odr i32 @_ZZNK32lambdas_in_NSDMIs_template_class1LIiEUliE_clEiENKUliE_clEi(%class.anon
+
// CHECK-LABEL: define linkonce_odr void @_ZZN15inline_function3fooEvENKUliE_clEi
// CHECK-LABEL: define linkonce_odr signext i8 @_ZZZN15inline_function3fooEvENKUliE_clEiENKUlcE_clEc
namespace inline_function {
@@ -43,8 +51,3 @@ inline int foo() {
}
int use = foo();
}
-// CHECK-LABEL: define linkonce_odr void @_ZNK32lambdas_in_NSDMIs_template_class1LIiEUliE_clEi(%class.anon
-// CHECK-LABEL: define linkonce_odr i32 @_ZZNK32lambdas_in_NSDMIs_template_class1LIiEUliE_clEiENKUliE_clEi(%class.anon
-
-// CHECK-LABEL: define linkonce_odr void @_ZNK12non_template1L1tMUliE_clEi(%class.anon
-// CHECK-LABEL: define linkonce_odr i32 @_ZZNK12non_template1L1tMUliE_clEiENKUliE_clEi(%class.anon
diff --git a/test/CodeGenCXX/lambda-expressions.cpp b/test/CodeGenCXX/lambda-expressions.cpp
index 9afd20da1b..7fb22988fa 100644
--- a/test/CodeGenCXX/lambda-expressions.cpp
+++ b/test/CodeGenCXX/lambda-expressions.cpp
@@ -99,14 +99,7 @@ int *PR22071_fun() {
return [&] { return &y; }();
}
-// CHECK-LABEL: define internal void @"_ZZ1hvEN3$_98__invokeEv"(%struct.A* noalias sret %agg.result) {{.*}} {
-// CHECK-NOT: =
-// CHECK: call void @"_ZZ1hvENK3$_9clEv"(%struct.A* sret %agg.result,
-// CHECK-NEXT: ret void
-struct A { ~A(); };
-void h() {
- A (*h)() = [] { return A(); };
-}
+// CHECK-LABEL: define internal void @"_ZZ1e1ES_bEN3$_4D2Ev"
// CHECK-LABEL: define internal i32 @"_ZZ1fvEN3$_58__invokeEii"
// CHECK: store i32
@@ -116,7 +109,14 @@ void h() {
// CHECK-NEXT: call i32 @"_ZZ1fvENK3$_5clEii"
// CHECK-NEXT: ret i32
-// CHECK-LABEL: define internal void @"_ZZ1e1ES_bEN3$_4D2Ev"
+// CHECK-LABEL: define internal void @"_ZZ1hvEN3$_98__invokeEv"(%struct.A* noalias sret %agg.result) {{.*}} {
+// CHECK-NOT: =
+// CHECK: call void @"_ZZ1hvENK3$_9clEv"(%struct.A* sret %agg.result,
+// CHECK-NEXT: ret void
+struct A { ~A(); };
+void h() {
+ A (*h)() = [] { return A(); };
+}
// <rdar://problem/12778708>
struct XXX {};
diff --git a/test/CodeGenCXX/mangle-abi-examples.cpp b/test/CodeGenCXX/mangle-abi-examples.cpp
index 6fb82cf8da..832956fb98 100644
--- a/test/CodeGenCXX/mangle-abi-examples.cpp
+++ b/test/CodeGenCXX/mangle-abi-examples.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
-// CHECK: @_ZTVZ3foovEN1C1DE =
// CHECK: @_ZTVZN1A3fooEiE1B =
+// CHECK: @_ZTVZ3foovEN1C1DE =
// CHECK: define {{.*}} @_ZZZ3foovEN1C3barEvEN1E3bazEv(
// Itanium C++ ABI examples.
diff --git a/test/CodeGenCXX/mangle-lambdas.cpp b/test/CodeGenCXX/mangle-lambdas.cpp
index e8d3f1983d..1b784f322e 100644
--- a/test/CodeGenCXX/mangle-lambdas.cpp
+++ b/test/CodeGenCXX/mangle-lambdas.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
-// CHECK: @_ZZNK7PR12917IJiiEE1nMUlvE_clEvE1n = linkonce_odr global i32 0
-// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd_NKUlvE_clEvE1n = linkonce_odr global i32 0
-// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd0_NKUlvE_clEvE1n = linkonce_odr global i32 0
// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd1_NKUlvE_clEvE1n = linkonce_odr global i32 0
+// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd0_NKUlvE_clEvE1n = linkonce_odr global i32 0
+// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd_NKUlvE_clEvE1n = linkonce_odr global i32 0
+// CHECK: @_ZZNK7PR12917IJiiEE1nMUlvE_clEvE1n = linkonce_odr global i32 0
// CHECK-LABEL: define linkonce_odr void @_Z11inline_funci
inline void inline_func(int n) {
@@ -192,8 +192,40 @@ namespace PR12123 {
};
void B::h() { f(); }
}
+
// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
+// Check linkage of the various lambdas.
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE_clEv
+// CHECK: ret i32 1
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE0_clEv
+// CHECK: ret i32
+// CHECK-LABEL: define linkonce_odr double @_ZZ11inline_funciENKUlvE1_clEv
+// CHECK: ret double
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUliE_clEi
+// CHECK: ret i32
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE2_clEv
+// CHECK: ret i32 17
+
+// CHECK-LABEL: define linkonce_odr void @_ZN7MembersC2Ev
+// CHECK: call i32 @_ZNK7Members1xMUlvE_clEv
+// CHECK-NEXT: call i32 @_ZNK7Members1xMUlvE0_clE
+// CHECK-NEXT: add nsw i32
+// CHECK: call i32 @_ZNK7Members1yMUlvE_clEv
+// CHECK: ret void
+
+
+// Check the linkage of the lambdas used in test_Members.
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE_clEv
+// CHECK: ret i32 1
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE0_clEv
+// CHECK: ret i32 2
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1yMUlvE_clEv
+// CHECK: ret i32 3
+
+// CHECK-LABEL: define linkonce_odr void @_Z1fIZZNK23TestNestedInstantiationclEvENKUlvE_clEvEUlvE_EvT_
+
+
namespace PR12808 {
template <typename> struct B {
int a;
@@ -209,7 +241,6 @@ namespace PR12808 {
// CHECK-LABEL: define linkonce_odr i32 @_ZZZN7PR128081bIiEEviENKUlvE_clEvENKUlvE_clEv
}
-// CHECK-LABEL: define linkonce_odr void @_Z1fIZZNK23TestNestedInstantiationclEvENKUlvE_clEvEUlvE_EvT_
struct Members {
int x = [] { return 1; }() + [] { return 2; }();
@@ -217,13 +248,7 @@ struct Members {
};
void test_Members() {
- // CHECK-LABEL: define linkonce_odr void @_ZN7MembersC2Ev
- // CHECK: call i32 @_ZNK7Members1xMUlvE_clEv
- // CHECK-NEXT: call i32 @_ZNK7Members1xMUlvE0_clE
- // CHECK-NEXT: add nsw i32
- // CHECK: call i32 @_ZNK7Members1yMUlvE_clEv
Members members;
- // CHECK: ret void
}
template<typename P> void f(P) { }
@@ -239,23 +264,3 @@ struct TestNestedInstantiation {
void test_NestedInstantiation() {
TestNestedInstantiation()();
}
-
-// Check the linkage of the lambdas used in test_Members.
-// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE_clEv
-// CHECK: ret i32 1
-// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE0_clEv
-// CHECK: ret i32 2
-// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1yMUlvE_clEv
-// CHECK: ret i32 3
-
-// Check linkage of the various lambdas.
-// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE_clEv
-// CHECK: ret i32 1
-// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE0_clEv
-// CHECK: ret i32
-// CHECK-LABEL: define linkonce_odr double @_ZZ11inline_funciENKUlvE1_clEv
-// CHECK: ret double
-// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUliE_clEi
-// CHECK: ret i32
-// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE2_clEv
-// CHECK: ret i32 17
diff --git a/test/CodeGenCXX/mangle-local-class-vtables.cpp b/test/CodeGenCXX/mangle-local-class-vtables.cpp
index 078d735d8f..c90353e911 100644
--- a/test/CodeGenCXX/mangle-local-class-vtables.cpp
+++ b/test/CodeGenCXX/mangle-local-class-vtables.cpp
@@ -1,24 +1,24 @@
// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
-// CHECK: @_ZTVZN1J1KEvE1C = {{.*}} @_ZTIZN1J1KEvE1C {{.*}} @_ZZN1J1KEvENK1C1FEv
-// CHECK: @_ZTIZN1J1KEvE1C = {{.*}} @_ZTSZN1J1KEvE1C
-// CHECK: @_ZTVZ1GvE1C_1 = {{.*}} @_ZTIZ1GvE1C_1 {{.*}} @_ZZ1GvENK1C1FE_1v
-// CHECK: @_ZTIZ1GvE1C_1 = {{.*}} @_ZTSZ1GvE1C_1
-// CHECK: @_ZTVZ1GvE1C_0 = {{.*}} @_ZTIZ1GvE1C_0 {{.*}} @_ZZ1GvENK1C1FE_0v
-// CHECK: @_ZTIZ1GvE1C_0 = {{.*}} @_ZTSZ1GvE1C_0
-// CHECK: @_ZTVZ1GvE1C = {{.*}} @_ZTIZ1GvE1C {{.*}} @_ZZ1GvENK1C1FEv
+// CHECK: @_ZTVZ1GvE1C = {{.*}} @_ZTIZ1GvE1C {{.*}} @_ZZ1GvENK1C1FEv
// CHECK: @_ZTIZ1GvE1C = {{.*}} @_ZTSZ1GvE1C
+// CHECK: @_ZTVZ1GvE1C_0 = {{.*}} @_ZTIZ1GvE1C_0 {{.*}} @_ZZ1GvENK1C1FE_0v
+// CHECK: @_ZTIZ1GvE1C_0 = {{.*}} @_ZTSZ1GvE1C_0
+// CHECK: @_ZTVZ1GvE1C_1 = {{.*}} @_ZTIZ1GvE1C_1 {{.*}} @_ZZ1GvENK1C1FE_1v
+// CHECK: @_ZTIZ1GvE1C_1 = {{.*}} @_ZTSZ1GvE1C_1
+// CHECK: @_ZTVZN1J1KEvE1C = {{.*}} @_ZTIZN1J1KEvE1C {{.*}} @_ZZN1J1KEvENK1C1FEv
+// CHECK: @_ZTIZN1J1KEvE1C = {{.*}} @_ZTSZN1J1KEvE1C
-// CHECK: define {{.*}} @_ZZN1J1KEvEN1CC2Ev(
-// CHECK: define {{.*}} @_ZZN1J1KEvENK1C1FEv(
-// CHECK: define {{.*}} @_ZZ1GvEN1CC2E_1v(
-// CHECK: define {{.*}} @_ZZ1GvENK1C1FE_1v(
-// CHECK: define {{.*}} @_ZZ1GvENK1C1HE_1v(
+// CHECK: define {{.*}} @_ZZ1GvEN1CC2Ev(
+// CHECK: define {{.*}} @_ZZ1GvENK1C1FEv(
// CHECK: define {{.*}} @_ZZ1GvEN1CC2E_0v(
// CHECK: define {{.*}} @_ZZ1GvENK1C1FE_0v(
// CHECK: define {{.*}} @_ZZ1GvENK1C1GE_0v(
-// CHECK: define {{.*}} @_ZZ1GvEN1CC2Ev(
-// CHECK: define {{.*}} @_ZZ1GvENK1C1FEv(
+// CHECK: define {{.*}} @_ZZ1GvEN1CC2E_1v(
+// CHECK: define {{.*}} @_ZZ1GvENK1C1FE_1v(
+// CHECK: define {{.*}} @_ZZ1GvENK1C1HE_1v(
+// CHECK: define {{.*}} @_ZZN1J1KEvEN1CC2Ev(
+// CHECK: define {{.*}} @_ZZN1J1KEvENK1C1FEv(
struct I {
virtual void F() const = 0;
diff --git a/test/CodeGenCXX/mangle-local-classes-nested.cpp b/test/CodeGenCXX/mangle-local-classes-nested.cpp
index cee541f815..5daf0c0642 100644
--- a/test/CodeGenCXX/mangle-local-classes-nested.cpp
+++ b/test/CodeGenCXX/mangle-local-classes-nested.cpp
@@ -6,10 +6,10 @@
// CHECK: define {{.*}} @_ZZ2L1vEN1S2L2Ev(
// CHECK: define {{.*}} @_ZZ2L1vEN1S2L2E_0v(
// CHECK: define {{.*}} @_ZZ1FvEN1S1T1S1T1GEv(
-// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2E_0vEN1S3L3cEv(
-// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2E_0vEN1S3L3dE_0v(
// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2EvEN1S3L3aEv(
// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2EvEN1S3L3bE_0v(
+// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2E_0vEN1S3L3cEv(
+// CHECK: define {{.*}} @_ZZZ2L1vEN1S2L2E_0vEN1S3L3dE_0v(
void L1() {
{
diff --git a/test/CodeGenCXX/mangle-ms-abi-examples.cpp b/test/CodeGenCXX/mangle-ms-abi-examples.cpp
index 5dc9d2e71d..d6ff94b6e3 100644
--- a/test/CodeGenCXX/mangle-ms-abi-examples.cpp
+++ b/test/CodeGenCXX/mangle-ms-abi-examples.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
-// CHECK: @"\01??_7D@C@?1??foo@@YAXXZ@6B@" =
// CHECK: @"\01??_7B@?1??foo@A@@QAEXH@Z@6B@" =
+// CHECK: @"\01??_7D@C@?1??foo@@YAXXZ@6B@" =
// CHECK: define {{.*}} @"\01?baz@E@?3??bar@C@?1??foo@@YAXXZ@QAEXXZ@QAEXXZ"(
// Microsoft Visual C++ ABI examples.
diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp
index 678956e111..b06f7987fc 100644
--- a/test/CodeGenCXX/mangle-subst-std.cpp
+++ b/test/CodeGenCXX/mangle-subst-std.cpp
@@ -3,14 +3,15 @@
// Check mangling of Vtables, VTTs, and construction vtables that
// involve standard substitutions.
+
// CHECK: @_ZTVSd = linkonce_odr unnamed_addr constant
// CHECK: @_ZTTSd = linkonce_odr unnamed_addr constant
// CHECK: @_ZTCSd0_Si = linkonce_odr unnamed_addr constant
// CHECK: @_ZTCSd16_So = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTVSo = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTTSo = linkonce_odr unnamed_addr constant
// CHECK: @_ZTVSi = linkonce_odr unnamed_addr constant
// CHECK: @_ZTTSi = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTVSo = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTTSo = linkonce_odr unnamed_addr constant
namespace std {
struct A { A(); };
diff --git a/test/CodeGenCXX/member-functions.cpp b/test/CodeGenCXX/member-functions.cpp
index 1773c67fc8..1d2a60dfdc 100644
--- a/test/CodeGenCXX/member-functions.cpp
+++ b/test/CodeGenCXX/member-functions.cpp
@@ -74,12 +74,11 @@ void test3() {
T result = t1 + t2;
}
-// S::~S()
-// CHECK: define linkonce_odr void @_ZN1SD2Ev{{.*}} unnamed_addr
-
// S::S()
// CHECK: define linkonce_odr void @_ZN1SC2Ev{{.*}} unnamed_addr
// S::v()
// CHECK: define linkonce_odr void @_ZN1S1vEv{{.*}}unnamed_addr
+// S::~S()
+// CHECK: define linkonce_odr void @_ZN1SD2Ev{{.*}} unnamed_addr
diff --git a/test/CodeGenCXX/member-init-anon-union.cpp b/test/CodeGenCXX/member-init-anon-union.cpp
index b488fa763d..6c2f90d284 100644
--- a/test/CodeGenCXX/member-init-anon-union.cpp
+++ b/test/CodeGenCXX/member-init-anon-union.cpp
@@ -43,6 +43,18 @@ union B {
B b1;
B b2(0);
+// CHECK: define {{.*}}@"[[CONSTRUCT_GLOBAL]]C2Ev"
+// CHECK-NOT: }
+// CHECK: call {{.*}}@_Z6make_a
+
+// CHECK: define {{.*}}@"[[CONSTRUCT_LOCAL]]C2Ev"
+// CHECK-NOT: }
+// CHECK: store i32 81
+
+// CHECK-LABEL: define {{.*}} @_ZN1BC2Ev(
+// CHECK: call void @_ZN1AC1Ev(
+// CHECK: store i32 123,
+// CHECK: }
// CHECK-LABEL: define {{.*}} @_ZN1BC2Ei(
// CHECK-NOT: call void @_ZN1AC1Ev(
@@ -51,17 +63,3 @@ B b2(0);
// CHECK-NOT: call void @_ZN1AC1Ev(
// CHECK-NOT: store i32 123,
// CHECK: }
-
-// CHECK-LABEL: define {{.*}} @_ZN1BC2Ev(
-// CHECK: call void @_ZN1AC1Ev(
-// CHECK: store i32 123,
-// CHECK: }
-
-
-// CHECK: define {{.*}}@"[[CONSTRUCT_LOCAL]]C2Ev"
-// CHECK-NOT: }
-// CHECK: store i32 81
-
-// CHECK: define {{.*}}@"[[CONSTRUCT_GLOBAL]]C2Ev"
-// CHECK-NOT: }
-// CHECK: call {{.*}}@_Z6make_a
diff --git a/test/CodeGenCXX/microsoft-abi-methods.cpp b/test/CodeGenCXX/microsoft-abi-methods.cpp
index 579e549ab4..aa3141c7d3 100644
--- a/test/CodeGenCXX/microsoft-abi-methods.cpp
+++ b/test/CodeGenCXX/microsoft-abi-methods.cpp
@@ -75,6 +75,9 @@ void constructors() {
// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %class.Base* @"\01??0Base@@QAE@XZ"
// CHECK: ret
+// Make sure that the Base constructor definition uses the right CC:
+// CHECK: define linkonce_odr x86_thiscallcc %class.Base* @"\01??0Base@@QAE@XZ"
+
// Make sure that the Base destructor call in the Child denstructor uses
// the right calling convention:
// CHECK: define linkonce_odr x86_thiscallcc void @"\01??1Child@@QAE@XZ"
@@ -83,7 +86,4 @@ void constructors() {
// Make sure that the Base destructor definition uses the right CC:
// CHECK: define linkonce_odr x86_thiscallcc void @"\01??1Base@@QAE@XZ"
-
-// Make sure that the Base constructor definition uses the right CC:
-// CHECK: define linkonce_odr x86_thiscallcc %class.Base* @"\01??0Base@@QAE@XZ"
}
diff --git a/test/CodeGenCXX/microsoft-abi-vftables.cpp b/test/CodeGenCXX/microsoft-abi-vftables.cpp
index 14bd6c388b..f832596426 100644
--- a/test/CodeGenCXX/microsoft-abi-vftables.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vftables.cpp
@@ -37,6 +37,6 @@ struct W {
} w;
}
// RTTI-DAG: [[VTABLE_W:@.*]] = private unnamed_addr constant [2 x i8*] [i8* bitcast ({{.*}} @"\01??_R4W@?A@@6B@" to i8*), i8* bitcast ({{.*}} @"\01??_GW@?A@@UAEPAXI@Z" to i8*)], comdat($"\01??_7W@?A@@6B@")
-// RTTI-DAG: @"\01??_7W@?A@@6B@" = internal unnamed_addr alias getelementptr inbounds ([2 x i8*]* @1, i32 0, i32 1)
+// RTTI-DAG: @"\01??_7W@?A@@6B@" = internal unnamed_addr alias getelementptr inbounds ([2 x i8*]* @2, i32 0, i32 1)
// NO-RTTI-DAG: @"\01??_7W@?A@@6B@" = internal unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GW@?A@@UAEPAXI@Z" to i8*)]
diff --git a/test/CodeGenCXX/microsoft-interface.cpp b/test/CodeGenCXX/microsoft-interface.cpp
index ec558a4081..a9fffc4fdb 100644
--- a/test/CodeGenCXX/microsoft-interface.cpp
+++ b/test/CodeGenCXX/microsoft-interface.cpp
@@ -29,12 +29,12 @@ int fn() {
// CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @_ZN1S4testEv(%struct.S* %this)
// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc i32 @_ZN1I4testEv(%__interface.I* %{{[.0-9A-Z_a-z]+}})
-// CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @_ZN1I4testEv(%__interface.I* %this)
-// CHECK: ret i32 1
-
// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @_ZN1SC2Ev(%struct.S* %this)
// CHECK: call x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* %{{[.0-9A-Z_a-z]+}})
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1S, i64 0, i64 2) to i32 (...)**), i32 (...)*** %{{[.0-9A-Z_a-z]+}}
// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* %this)
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1I, i64 0, i64 2) to i32 (...)**), i32 (...)*** %{{[.0-9A-Z_a-z]+}}
+
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @_ZN1I4testEv(%__interface.I* %this)
+// CHECK: ret i32 1
diff --git a/test/CodeGenCXX/pod-member-memcpys.cpp b/test/CodeGenCXX/pod-member-memcpys.cpp
index a3ee990bf3..3c05847685 100644
--- a/test/CodeGenCXX/pod-member-memcpys.cpp
+++ b/test/CodeGenCXX/pod-member-memcpys.cpp
@@ -180,47 +180,50 @@ CALL_AO(PackedMembers)
#define CALL_CC(T) T callCC##T(const T& b) { return b; }
CALL_CC(PackedMembers)
+// PackedMembers copy-assignment:
+// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
+// CHECK: call void @_ZN6NonPODC1ERKS_
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
+// CHECK: ret void
+
CALL_CC(BitfieldMember2)
+// BitfieldMember2 copy-constructor:
+// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* dereferenceable({{[0-9]+}}))
+// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false)
+// CHECK-2: call void @_ZN6NonPODC1ERKS_
+// CHECK-2: ret void
+
CALL_CC(BitfieldMember3)
-CALL_CC(ReferenceMember)
-CALL_CC(InnerClassMember)
-CALL_CC(BitfieldMember)
-CALL_CC(VolatileMember)
-CALL_CC(ArrayMember)
-CALL_CC(PODLikeMember)
-CALL_CC(PODMember)
-CALL_CC(Basic)
+// BitfieldMember3 copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN15BitfieldMember3C2ERKS_(%struct.BitfieldMember3* %this, %struct.BitfieldMember3* dereferenceable({{[0-9]+}}))
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 8, i32 8, i1 false)
+// CHECK: ret void
-// Basic copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
+CALL_CC(ReferenceMember)
+// ReferenceMember copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* dereferenceable({{[0-9]+}}))
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: ret void
-// PODMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
+CALL_CC(InnerClassMember)
+// InnerClass copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
-// PODLikeMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: invoke void @_ZN6NonPODC1ERKS_
+CALL_CC(BitfieldMember)
+// BitfieldMember copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
-// CHECK: ret void
-// CHECK: landingpad
-// CHECK: invoke void @_ZN7PODLikeD1Ev
-
-// ArrayMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret void
+CALL_CC(VolatileMember)
// VolatileMember copy-constructor:
// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
@@ -230,40 +233,36 @@ CALL_CC(Basic)
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
-// BitfieldMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
+CALL_CC(ArrayMember)
+// ArrayMember copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret void
-// InnerClass copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
+CALL_CC(PODLikeMember)
+// PODLikeMember copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call void @_ZN6NonPODC1ERKS_
+// CHECK: invoke void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
+// CHECK: landingpad
+// CHECK: invoke void @_ZN7PODLikeD1Ev
-// ReferenceMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
+CALL_CC(PODMember)
+// PODMember copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
-// CHECK: ret void
-
-// BitfieldMember3 copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15BitfieldMember3C2ERKS_(%struct.BitfieldMember3* %this, %struct.BitfieldMember3* dereferenceable({{[0-9]+}}))
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 8, i32 8, i1 false)
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
-// BitfieldMember2 copy-constructor:
-// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* dereferenceable({{[0-9]+}}))
-// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false)
-// CHECK-2: call void @_ZN6NonPODC1ERKS_
-// CHECK-2: ret void
-
-// PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
+CALL_CC(Basic)
+// Basic copy-constructor:
+// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp
index 3b06d426e5..b6b72aa04a 100644
--- a/test/CodeGenCXX/rtti-linkage.cpp
+++ b/test/CodeGenCXX/rtti-linkage.cpp
@@ -33,12 +33,12 @@
// CHECK-WITH-HIDDEN: @_ZTIPK2T4 = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTSZ2t5vE1A = internal constant
// CHECK-WITH-HIDDEN: @_ZTIZ2t5vE1A = internal constant
+// CHECK-WITH-HIDDEN: @_ZTSZ2t6vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTIZ2t6vE1A = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTSPZ2t7vE1A = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTSZ2t7vE1A = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTIZ2t7vE1A = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTIPZ2t7vE1A = linkonce_odr hidden constant
-// CHECK-WITH-HIDDEN: @_ZTSZ2t6vE1A = linkonce_odr hidden constant
-// CHECK-WITH-HIDDEN: @_ZTIZ2t6vE1A = linkonce_odr hidden constant
// CHECK: _ZTSN12_GLOBAL__N_11DE = internal constant
// CHECK: _ZTIN12_GLOBAL__N_11DE = internal constant
@@ -64,12 +64,12 @@
// CHECK: _ZTS1B = constant
// CHECK: _ZTI1B = constant
// CHECK: _ZTS1F = linkonce_odr constant
+// CHECK: _ZTSZ2t6vE1A = linkonce_odr constant
+// CHECK: _ZTIZ2t6vE1A = linkonce_odr constant
// CHECK: _ZTSPZ2t7vE1A = linkonce_odr constant
// CHECK: _ZTSZ2t7vE1A = linkonce_odr constant
// CHECK: _ZTIZ2t7vE1A = linkonce_odr constant
// CHECK: _ZTIPZ2t7vE1A = linkonce_odr constant
-// CHECK: _ZTSZ2t6vE1A = linkonce_odr constant
-// CHECK: _ZTIZ2t6vE1A = linkonce_odr constant
// CHECK: _ZTIN12_GLOBAL__N_11DE to
diff --git a/test/CodeGenCXX/static-init.cpp b/test/CodeGenCXX/static-init.cpp
index 66ff5b3fba..acac84d599 100644
--- a/test/CodeGenCXX/static-init.cpp
+++ b/test/CodeGenCXX/static-init.cpp
@@ -5,10 +5,10 @@
// CHECK: @base_req_uchar = global [4 x i8] c"bar\00", align 1
// CHECK: @_ZZN5test31BC1EvE1u = internal global { i8, [3 x i8] } { i8 97, [3 x i8] undef }, align 4
-// CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16
// CHECK: @_ZZ2h2vE1i = linkonce_odr global i32 0, comdat, align
// CHECK: @_ZGVZ2h2vE1i = linkonce_odr global i64 0, comdat{{$}}
+// CHECK: @_ZZN5test1L6getvarEiE3var = internal constant [4 x i32] [i32 1, i32 0, i32 2, i32 4], align 16
struct A {
A();
diff --git a/test/CodeGenCXX/static-local-in-local-class.cpp b/test/CodeGenCXX/static-local-in-local-class.cpp
index 729b9376ae..9c13ff1c45 100644
--- a/test/CodeGenCXX/static-local-in-local-class.cpp
+++ b/test/CodeGenCXX/static-local-in-local-class.cpp
@@ -1,11 +1,11 @@
// RUN: %clang_cc1 -triple x86_64-linux -fblocks -emit-llvm -o - %s -std=c++1y | FileCheck %s
-// CHECK: @"_ZZNK3$_2clEvE1x" = internal global i32 42
-// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr global i8* blockaddress(@_Z18static_local_labelPv, %{{.*}})
-// CHECK: @_ZZZL20block_deduced_returnvEUb_E1n = internal global i32 42
-// CHECK: @_ZZL14deduced_returnvE1n = internal global i32 42
// CHECK: @"_ZZZNK17pr18020_constexpr3$_1clEvENKUlvE_clEvE2l2" =
// CHECK: internal global i32* @"_ZZNK17pr18020_constexpr3$_1clEvE2l1"
+// CHECK: @_ZZL14deduced_returnvE1n = internal global i32 42
+// CHECK: @_ZZZL20block_deduced_returnvEUb_E1n = internal global i32 42
+// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr global i8* blockaddress(@_Z18static_local_labelPv, %{{.*}})
+// CHECK: @"_ZZNK3$_2clEvE1x" = internal global i32 42
namespace pr6769 {
struct X {
diff --git a/test/CodeGenCXX/template-anonymous-types.cpp b/test/CodeGenCXX/template-anonymous-types.cpp
index f4d6549e83..63685efbfa 100644
--- a/test/CodeGenCXX/template-anonymous-types.cpp
+++ b/test/CodeGenCXX/template-anonymous-types.cpp
@@ -24,14 +24,13 @@ void test() {
// CHECK-LABEL: define linkonce_odr i32 @_Z1fIN1SUt0_EEiT_(i32 %t)
(void)f(S::BAR);
- // Now check for the class template instantiations. Annoyingly, they are in
- // reverse order.
+ // Now check for the class template instantiations.
//
// BAR's instantiation of X:
- // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X* %this)
- // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt_EE1fEv(%struct.X* %this)
+ // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr
//
// FOO's instantiation of X:
- // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt_EE1fEv(%struct.X.0* %this)
- // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X.0* %this)
+ // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr
}
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp
index 89e4db3948..891667eee3 100644
--- a/test/CodeGenCXX/thunks.cpp
+++ b/test/CodeGenCXX/thunks.cpp
@@ -363,12 +363,12 @@ namespace Test15 {
/**** The following has to go at the end of the file ****/
+// This is from Test5:
+// CHECK-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(
+// CHECK-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
+
// This is from Test10:
// CHECK-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv
// CHECK-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv
-// This is from Test5:
-// CHECK-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
-// CHECK-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(
-
// CHECK: attributes [[NUW]] = { nounwind uwtable{{.*}} }
diff --git a/test/CodeGenCXX/virtual-base-destructor-call.cpp b/test/CodeGenCXX/virtual-base-destructor-call.cpp
index 3d79071582..29f1f5c794 100644
--- a/test/CodeGenCXX/virtual-base-destructor-call.cpp
+++ b/test/CodeGenCXX/virtual-base-destructor-call.cpp
@@ -22,11 +22,6 @@ int main() {
// 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: call {{.*}} @_ZN13basic_istreamIcED2Ev
-// CHECK: }
-
// 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
@@ -49,3 +44,8 @@ int main() {
// CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED2Ev(%struct.basic_istream* {{.*}}%this, i8** %vtt) unnamed_addr
// CHECK-NOT: call
// CHECK: }
+
+// 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: call {{.*}} @_ZN13basic_istreamIcED2Ev
+// CHECK: }
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp
index 1c4d5bb8e7..e0271099e2 100644
--- a/test/CodeGenCXX/visibility.cpp
+++ b/test/CodeGenCXX/visibility.cpp
@@ -135,17 +135,22 @@ namespace test27 {
// CHECK-HIDDEN: _ZTVN6test271CIiE1DE = unnamed_addr constant
}
-// CHECK: @_ZZN6Test193fooIiEEvvE1a = linkonce_odr global
-// CHECK: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr global i64
-// CHECK-HIDDEN: @_ZZN6Test193fooIiEEvvE1a = linkonce_odr hidden global
-// CHECK-HIDDEN: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr hidden global i64
+// CHECK: @_ZTVN5Test63fooE = linkonce_odr hidden unnamed_addr constant
+
+// CHECK-HIDDEN: @_ZTVN6Test161AIcEE = external unnamed_addr constant
+// CHECK-HIDDEN: @_ZTTN6Test161AIcEE = external unnamed_addr constant
+
// CHECK: @_ZZN6test681fC1EvE4test = linkonce_odr global
-// CHECK: @_ZGVZN6test681fC1EvE4test = linkonce_odr global
// CHECK-HIDDEN: @_ZZN6test681fC1EvE4test = linkonce_odr hidden global
+
+// CHECK: @_ZGVZN6test681fC1EvE4test = linkonce_odr global
// CHECK-HIDDEN: @_ZGVZN6test681fC1EvE4test = linkonce_odr hidden global
-// CHECK-HIDDEN: @_ZTVN6Test161AIcEE = external unnamed_addr constant
-// CHECK-HIDDEN: @_ZTTN6Test161AIcEE = external unnamed_addr constant
-// CHECK: @_ZTVN5Test63fooE = linkonce_odr hidden unnamed_addr constant
+
+// CHECK: @_ZZN6Test193fooIiEEvvE1a = linkonce_odr global
+// CHECK-HIDDEN: @_ZZN6Test193fooIiEEvvE1a = linkonce_odr hidden global
+
+// CHECK: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr global i64
+// CHECK-HIDDEN: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr hidden global i64
namespace Test1 {
// CHECK-LABEL: define hidden void @_ZN5Test11fEv
diff --git a/test/CodeGenCXX/vla-lambda-capturing.cpp b/test/CodeGenCXX/vla-lambda-capturing.cpp
index 7665c2c028..1341b14cd6 100644
--- a/test/CodeGenCXX/vla-lambda-capturing.cpp
+++ b/test/CodeGenCXX/vla-lambda-capturing.cpp
@@ -111,6 +111,15 @@ int main() {
// CHECK: call void @llvm.stackrestore(
// CHECK: ret void
+// CHECK: define linkonce_odr void [[F_INT_LAMBDA]]([[CAP_TYPE2]]*
+// CHECK: [[THIS:%.+]] = load [[CAP_TYPE2]]**
+// CHECK: [[SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]]* [[THIS]], i{{.+}} 0, i{{.+}} 0
+// CHECK: [[SIZE:%.+]] = load [[INTPTR_T]]* [[SIZE_REF]]
+// CHECK: call i{{.+}}* @llvm.stacksave()
+// CHECK: alloca [[INTPTR_T]], [[INTPTR_T]] [[SIZE]]
+// CHECK: call void @llvm.stackrestore(
+// CHECK: ret void
+
// CHECK: define {{.*}} void [[B_INT_LAMBDA]]([[CAP_TYPE3]]*
// CHECK: [[SIZE2_REF:%.+]] = getelementptr inbounds [[CAP_TYPE3]]* [[THIS:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
// CHECK: [[SIZE2:%.+]] = load i{{[0-9]+}}* [[SIZE2_REF]]
@@ -159,13 +168,4 @@ int main() {
// CHECK: [[MUL:%.+]] = mul {{.*}} i{{[0-9]+}} [[SIZE2]], [[SIZE1]]
// CHECK: mul {{.*}} i{{[0-9]+}} {{[0-9]+}}, [[MUL]]
// CHECK: ret void
-
-// CHECK: define linkonce_odr void [[F_INT_LAMBDA]]([[CAP_TYPE2]]*
-// CHECK: [[THIS:%.+]] = load [[CAP_TYPE2]]**
-// CHECK: [[SIZE_REF:%.+]] = getelementptr inbounds [[CAP_TYPE2]]* [[THIS]], i{{.+}} 0, i{{.+}} 0
-// CHECK: [[SIZE:%.+]] = load [[INTPTR_T]]* [[SIZE_REF]]
-// CHECK: call i{{.+}}* @llvm.stacksave()
-// CHECK: alloca [[INTPTR_T]], [[INTPTR_T]] [[SIZE]]
-// CHECK: call void @llvm.stackrestore(
-// CHECK: ret void
#endif
diff --git a/test/CodeGenCXX/vtable-pointer-initialization.cpp b/test/CodeGenCXX/vtable-pointer-initialization.cpp
index b5f92ae6bc..efdaa6d4b6 100644
--- a/test/CodeGenCXX/vtable-pointer-initialization.cpp
+++ b/test/CodeGenCXX/vtable-pointer-initialization.cpp
@@ -47,14 +47,14 @@ void f() { B b; }
// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN1BD2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2) to i32 (...)**)
-// CHECK: call void @_ZN5FieldD1Ev(
-// CHECK: call void @_ZN4BaseD2Ev(
-// CHECK: ret void
-
// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN4BaseC2Ev(
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2) to i32 (...)**)
// CHECK: call void @_ZN5FieldC1Ev
// CHECK: ret void
+
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
+// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2) to i32 (...)**)
+// CHECK: call void @_ZN5FieldD1Ev(
+// CHECK: call void @_ZN4BaseD2Ev(
+// CHECK: ret void
diff --git a/test/CodeGenCXX/vtt-layout.cpp b/test/CodeGenCXX/vtt-layout.cpp
index abc2477f5b..d855da71ca 100644
--- a/test/CodeGenCXX/vtt-layout.cpp
+++ b/test/CodeGenCXX/vtt-layout.cpp
@@ -81,6 +81,6 @@ namespace Test6 {
// CHECK: @_ZTTN5Test11BE = unnamed_addr constant [1 x i8*] [i8* bitcast (i8** getelementptr inbounds ([4 x i8*]* @_ZTVN5Test11BE, i64 0, i64 3) to i8*)]
// CHECK: @_ZTVN5Test51AE = unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTIN5Test51AE to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* bitcast (void (%"struct.Test5::A"*)* @_ZN5Test51A6anchorEv to i8*)]
// CHECK: @_ZTVN5Test61AE = unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTIN5Test61AE to i8*), i8* bitcast (void ()* @__cxa_deleted_virtual to i8*), i8* bitcast (void (%"struct.Test6::A"*)* @_ZN5Test61A6anchorEv to i8*)]
-// CHECK: @_ZTTN5Test41DE = linkonce_odr unnamed_addr constant [19 x i8*] [i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 4) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 10) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 12) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 15) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 18) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 17) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 20) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 1, i64 0) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test41DE40_NS_2V1E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test41DE40_NS_2V1E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 4) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 10) to i8*)]
-// CHECK: @_ZTTN5Test31DE = linkonce_odr unnamed_addr constant [13 x i8*] [i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 5) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE0_NS_2C1E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE0_NS_2C1E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 10) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 15) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 11) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 11) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 1, i64 0) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE64_NS_2V2E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE64_NS_2V2E, i64 0, i64 6) to i8*)]
// CHECK: @_ZTTN5Test21CE = linkonce_odr unnamed_addr constant [2 x i8*] [i8* bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVN5Test21CE, i64 0, i64 4) to i8*), i8* bitcast (i8** getelementptr inbounds ([5 x i8*]* @_ZTVN5Test21CE, i64 0, i64 4) to i8*)]
+// CHECK: @_ZTTN5Test31DE = linkonce_odr unnamed_addr constant [13 x i8*] [i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 5) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE0_NS_2C1E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE0_NS_2C1E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 10) to i8*), i8* bitcast (i8** getelementptr inbounds ([14 x i8*]* @_ZTCN5Test31DE16_NS_2C2E, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 15) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 11) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 0, i64 11) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTVN5Test31DE, i64 1, i64 0) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE64_NS_2V2E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test31DE64_NS_2V2E, i64 0, i64 6) to i8*)]
+// CHECK: @_ZTTN5Test41DE = linkonce_odr unnamed_addr constant [19 x i8*] [i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 4) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE0_NS_2C1E, i64 0, i64 10) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 12) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 15) to i8*), i8* bitcast (i8** getelementptr inbounds ([19 x i8*]* @_ZTCN5Test41DE16_NS_2C2E, i64 0, i64 18) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 17) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 20) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 0, i64 13) to i8*), i8* bitcast (i8** getelementptr inbounds ([25 x i8*]* @_ZTVN5Test41DE, i64 1, i64 0) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test41DE40_NS_2V1E, i64 0, i64 3) to i8*), i8* bitcast (i8** getelementptr inbounds ([7 x i8*]* @_ZTCN5Test41DE40_NS_2V1E, i64 0, i64 6) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 4) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 7) to i8*), i8* bitcast (i8** getelementptr inbounds ([11 x i8*]* @_ZTCN5Test41DE72_NS_2V2E, i64 0, i64 10) to i8*)]
diff --git a/test/CodeGenObjCXX/arc-special-member-functions.mm b/test/CodeGenObjCXX/arc-special-member-functions.mm
index 8b002d5b4f..32c00a6e1b 100644
--- a/test/CodeGenObjCXX/arc-special-member-functions.mm
+++ b/test/CodeGenObjCXX/arc-special-member-functions.mm
@@ -104,27 +104,27 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// CHECK-NEXT: call void @objc_release(i8* [[T7]])
// CHECK-NEXT: ret
-// Implicitly-generated copy constructor for ObjCBlockMember
-// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2ERKS_
-// CHECK: call i8* @objc_retainBlock
-// CHECK: ret
-
-// Implicitly-generated destructor for ObjCBlockMember
-// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberD2Ev
-// CHECK: call void @objc_storeStrong(i8*
-// CHECK: ret
-
-// Implicitly-generated default constructor for ObjCBlockMember
-// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2Ev
-// CHECK: store {{.*}} null,
+// Implicitly-generated default constructor for ObjCMember
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2Ev
+// CHECK-NOT: objc_release
+// CHECK: store i8* null
// CHECK-NEXT: ret void
-// Implicitly-generated copy constructor for ObjCArrayMember
-// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2ERKS_
-// CHECK: br i1
+// Implicitly-generated destructor for ObjCMember
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberD2Ev
+// CHECK: call void @objc_storeStrong
+// CHECK: ret void
+
+// Implicitly-generated copy constructor for ObjCMember
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2ERKS_
+// CHECK-NOT: objc_release
// CHECK: call i8* @objc_retain
// CHECK-NEXT: store i8*
-// CHECK-NEXT: br label
+// CHECK-NEXT: ret void
+
+// Implicitly-generated default constructor for ObjCArrayMember
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2Ev
+// CHECK: call void @llvm.memset.p0i8.i64
// CHECK: ret
// Implicitly-generated destructor for ObjCArrayMember
@@ -136,29 +136,29 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// CHECK-NEXT: [[CUR]] = getelementptr inbounds i8** [[PAST]], i64 -1
// CHECK-NEXT: call void @objc_storeStrong(i8** [[CUR]], i8* null)
// CHECK-NEXT: [[T1:%.*]] = icmp eq i8** [[CUR]], [[BEGIN]]
-// CHECK-NEXT: br i1 [[T1]],
+// CHECK-NEXT: br i1 [[T1]],
// CHECK: ret void
-// Implicitly-generated default constructor for ObjCArrayMember
-// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2Ev
-// CHECK: call void @llvm.memset.p0i8.i64
-// CHECK: ret
-
-// Implicitly-generated copy constructor for ObjCMember
-// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2ERKS_
-// CHECK-NOT: objc_release
+// Implicitly-generated copy constructor for ObjCArrayMember
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2ERKS_
+// CHECK: br i1
// CHECK: call i8* @objc_retain
// CHECK-NEXT: store i8*
+// CHECK-NEXT: br label
+// CHECK: ret
+
+// Implicitly-generated default constructor for ObjCBlockMember
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2Ev
+// CHECK: store {{.*}} null,
// CHECK-NEXT: ret void
-// Implicitly-generated destructor for ObjCMember
-// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberD2Ev
-// CHECK: call void @objc_storeStrong
-// CHECK: ret void
+// Implicitly-generated destructor for ObjCBlockMember
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberD2Ev
+// CHECK: call void @objc_storeStrong(i8*
+// CHECK: ret
-// Implicitly-generated default constructor for ObjCMember
-// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2Ev
-// CHECK-NOT: objc_release
-// CHECK: store i8* null
-// CHECK-NEXT: ret void
+// Implicitly-generated copy constructor for ObjCBlockMember
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2ERKS_
+// CHECK: call i8* @objc_retainBlock
+// CHECK: ret
diff --git a/test/CodeGenObjCXX/destroy.mm b/test/CodeGenObjCXX/destroy.mm
index c53ac393de..5d797d32d4 100644
--- a/test/CodeGenObjCXX/destroy.mm
+++ b/test/CodeGenObjCXX/destroy.mm
@@ -43,8 +43,8 @@ void test4() {
// CHECK: call void @_ZN8tderivedIiEC1Ev
// CHECK: call void @_ZN8tderivedIiED1Ev
-// CHECK-LABEL: define linkonce_odr void @_ZN8tderivedIiED2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN7derivedD2Ev
// CHECK: call void @objc_storeStrong(i8** {{.*}}, i8* null)
-// CHECK-LABEL: define linkonce_odr void @_ZN7derivedD2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN8tderivedIiED2Ev
// CHECK: call void @objc_storeStrong(i8** {{.*}}, i8* null)
diff --git a/test/CodeGenObjCXX/lambda-expressions.mm b/test/CodeGenObjCXX/lambda-expressions.mm
index 9129ff091e..4b1995d810 100644
--- a/test/CodeGenObjCXX/lambda-expressions.mm
+++ b/test/CodeGenObjCXX/lambda-expressions.mm
@@ -60,6 +60,8 @@ void take_block(void (^block)()) { block(); }
}
@end
+// ARC-LABEL: define linkonce_odr i32 ()* @_ZZNK13StaticMembersIfE1fMUlvE_clEvENKUlvE_cvU13block_pointerFivEEv
+
// Check lines for BlockInLambda test below
// ARC-LABEL: define internal i32 @___ZZN13BlockInLambda1X1fEvENKUlvE_clEv_block_invoke
// ARC: [[Y:%.*]] = getelementptr inbounds %"struct.BlockInLambda::X"* {{.*}}, i32 0, i32 1
@@ -73,7 +75,6 @@ template<typename T> struct StaticMembers {
template<typename T>
fptr StaticMembers<T>::f = [] { auto f = []{return 5;}; return fptr(f); }();
template fptr StaticMembers<float>::f;
-// ARC-LABEL: define linkonce_odr i32 ()* @_ZZNK13StaticMembersIfE1fMUlvE_clEvENKUlvE_cvU13block_pointerFivEEv
namespace BlockInLambda {
struct X {
diff --git a/test/CodeGenObjCXX/mangle-blocks.mm b/test/CodeGenObjCXX/mangle-blocks.mm
index 1f3f163adb..283996d18a 100644
--- a/test/CodeGenObjCXX/mangle-blocks.mm
+++ b/test/CodeGenObjCXX/mangle-blocks.mm
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -emit-llvm -fblocks -o - -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck %s
// CHECK: @_ZZZN26externally_visible_statics1S3fooEiEd_Ub0_E1k = linkonce_odr global i32 0
-// CHECK: @_ZZ26externally_visible_statics1S1xMUb0_E1j = linkonce_odr global i32 0
// CHECK: @_ZZZN26externally_visible_statics10inlinefuncEvEUb0_E1i = linkonce_odr global i32 0
+// CHECK: @_ZZ26externally_visible_statics1S1xMUb0_E1j = linkonce_odr global i32 0
int f();
diff --git a/test/Modules/cxx-irgen.cpp b/test/Modules/cxx-irgen.cpp
index ecaf704b87..13902bf926 100644
--- a/test/Modules/cxx-irgen.cpp
+++ b/test/Modules/cxx-irgen.cpp
@@ -5,7 +5,6 @@
@import cxx_irgen_top;
-// CHECK-DAG: call {{[a-z]*[ ]?i32}} @_ZN8CtorInitIiE1fEv(
CtorInit<int> x;
@import cxx_irgen_left;
@@ -34,23 +33,25 @@ int b = h();
// CHECK-DAG: define linkonce_odr {{signext i32|i32}} @_Z3minIiET_S0_S0_(i32
int c = min(1, 2);
-
-// CHECK-LABEL: define {{.*}} @_ZN20OperatorDeleteLookup1AD0Ev(
-// CHECK: call void @_ZN20OperatorDeleteLookup1AdlEPv(
+// CHECK: define available_externally {{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
namespace ImplicitSpecialMembers {
- // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2EOS0_(
- // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
- // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2ERKS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2ERKS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
- // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1CC2EOS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2EOS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
// CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1CC2ERKS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
- // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2EOS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1CC2EOS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
- // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1BC2ERKS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2ERKS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2EOS0_(
+ // CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
+ // CHECK-LABEL: define {{.*}} @_ZN20OperatorDeleteLookup1AD0Ev(
+ // CHECK: call void @_ZN20OperatorDeleteLookup1AdlEPv(
+
+ // CHECK-DAG: call {{[a-z]*[ ]?i32}} @_ZN8CtorInitIiE1fEv(
extern B b1;
B b2(b1);
@@ -71,6 +72,5 @@ namespace OperatorDeleteLookup {
void g() { f(); }
}
-// CHECK: define available_externally {{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
// CHECK: attributes #[[ALWAYS_INLINE]] = {{.*}} alwaysinline
diff --git a/test/Modules/templates-2.mm b/test/Modules/templates-2.mm
index b7ceafbbc5..8a752f7613 100644
--- a/test/Modules/templates-2.mm
+++ b/test/Modules/templates-2.mm
@@ -23,14 +23,14 @@ void testEmitDefaultedSpecialMembers() {
// CHECK-LABEL: define {{.*}} @_ZN27EmitDefaultedSpecialMembers11SmallStringILj256EED1Ev(
// CHECK: call {{.*}} @_ZN27EmitDefaultedSpecialMembers11SmallStringILj256EED2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallStringILj256EED2Ev(
-// CHECK: call void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EED2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EED2Ev(
-// CHECK: call void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcED2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcED2Ev(
-
// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallStringILj256EEC2Ev(
// CHECK: call void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EEC2Ev(
// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EEC2Ev(
// CHECK: call void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcEC2Ev(
// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcEC2Ev(
+
+// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallStringILj256EED2Ev(
+// CHECK: call void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EED2Ev(
+// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers11SmallVectorIcLj256EED2Ev(
+// CHECK: call void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcED2Ev(
+// CHECK-LABEL: define linkonce_odr void @_ZN27EmitDefaultedSpecialMembers15SmallVectorImplIcED2Ev(
diff --git a/test/SemaCXX/linkage.cpp b/test/SemaCXX/linkage.cpp
index 8a2013fd52..79c7835867 100644
--- a/test/SemaCXX/linkage.cpp
+++ b/test/SemaCXX/linkage.cpp
@@ -94,8 +94,8 @@ extern "C" {
}
}
-// CHECK: define linkonce_odr i8* @_ZN5test21A1BILj0EE3fooEv(
// CHECK: define linkonce_odr i8* @_ZN5test11A3fooILj0EEEPvv(
+// CHECK: define linkonce_odr i8* @_ZN5test21A1BILj0EE3fooEv(
namespace test5 {
struct foo {