summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-01-22 00:24:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-01-22 00:24:57 +0000
commite5df59ff78faebd897e81907606ce6074aac0df6 (patch)
tree7f1ba19983a42f716c7643dd07244aa4a9531790 /clang/test/CodeGenCXX/cxx1y-init-captures.cpp
parent343e4964733d0063de2551a93d912b93880cada9 (diff)
downloadbcm5719-llvm-e5df59ff78faebd897e81907606ce6074aac0df6.tar.gz
bcm5719-llvm-e5df59ff78faebd897e81907606ce6074aac0df6.zip
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
Diffstat (limited to 'clang/test/CodeGenCXX/cxx1y-init-captures.cpp')
-rw-r--r--clang/test/CodeGenCXX/cxx1y-init-captures.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp b/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
index a60269f3b18..c81b5922d44 100644
--- a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
+++ b/clang/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(
OpenPOWER on IntegriCloud