From e5df59ff78faebd897e81907606ce6074aac0df6 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 22 Jan 2015 00:24:57 +0000 Subject: Emit DeferredDeclsToEmit in a DFS order. Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751 --- clang/test/CodeGenCXX/member-init-anon-union.cpp | 26 +++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'clang/test/CodeGenCXX/member-init-anon-union.cpp') diff --git a/clang/test/CodeGenCXX/member-init-anon-union.cpp b/clang/test/CodeGenCXX/member-init-anon-union.cpp index b488fa763d6..6c2f90d284b 100644 --- a/clang/test/CodeGenCXX/member-init-anon-union.cpp +++ b/clang/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 -- cgit v1.2.3