diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-22 00:24:57 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-22 00:24:57 +0000 |
commit | e5df59ff78faebd897e81907606ce6074aac0df6 (patch) | |
tree | 7f1ba19983a42f716c7643dd07244aa4a9531790 /clang/test/CodeGenCXX/constructor-init.cpp | |
parent | 343e4964733d0063de2551a93d912b93880cada9 (diff) | |
download | bcm5719-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/constructor-init.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/constructor-init.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/clang/test/CodeGenCXX/constructor-init.cpp b/clang/test/CodeGenCXX/constructor-init.cpp index 9d029a3696b..e10b371dd27 100644 --- a/clang/test/CodeGenCXX/constructor-init.cpp +++ b/clang/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; }; |