summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/destructors.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-12 04:53:19 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-12 04:53:19 +0000
commit0196a1d98f8a206259a4b5ce93c21807243af92f (patch)
tree52a726555abc4d5c953de268f9b1bb914ad0d927 /clang/test/CodeGenCXX/destructors.cpp
parentb470652431078092cfd55bc3ebf93f3fe4fd02a3 (diff)
downloadbcm5719-llvm-0196a1d98f8a206259a4b5ce93c21807243af92f.tar.gz
bcm5719-llvm-0196a1d98f8a206259a4b5ce93c21807243af92f.zip
Keep the old function order in CodeGenModule::applyReplacements.
The original decls are created when used. The replacements are created at the end of the TU in reverse order. This makes the original order far better for testing. This is particularly important since the replacement logic could be used even when -mconstructor-aliases is not used, but that would make many tests hard to read. This is a fixed version of r194357 which handles replacing a destructor with another which is an alias to a third one. llvm-svn: 194452
Diffstat (limited to 'clang/test/CodeGenCXX/destructors.cpp')
-rw-r--r--clang/test/CodeGenCXX/destructors.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/destructors.cpp b/clang/test/CodeGenCXX/destructors.cpp
index 5b29ce5de4b..59c97b7dca9 100644
--- a/clang/test/CodeGenCXX/destructors.cpp
+++ b/clang/test/CodeGenCXX/destructors.cpp
@@ -36,13 +36,13 @@ namespace PR7526 {
struct allocator_derived : allocator { };
+ // CHECK-LABEL: define void @_ZN6PR75263fooEv()
+ // CHECK: call void {{.*}} @_ZN6PR75269allocatorD2Ev
+
// CHECK-LABEL: define void @_ZN6PR75269allocatorD2Ev(%"struct.PR7526::allocator"* %this) unnamed_addr
// CHECK: call void @__cxa_call_unexpected
allocator::~allocator() throw() { foo(); }
- // CHECK-LABEL: define void @_ZN6PR75263fooEv()
- // CHECK: call void {{.*}} @_ZN6PR75269allocatorD2Ev
-
void foo() {
allocator_derived ad;
}
@@ -393,16 +393,16 @@ namespace test10 {
// CHECK: call void @_ZN5test312_GLOBAL__N_11DD0Ev(
// CHECK: ret void
- // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
- // CHECK: invoke void @_ZN5test31BD2Ev(
- // CHECK: call void @_ZN5test31AD2Ev(
- // CHECK: ret void
-
// CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev(
// CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
// CHECK: call void @_ZN5test312_GLOBAL__N_11CD2Ev(
// CHECK: ret void
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
+ // CHECK: invoke void @_ZN5test31BD2Ev(
+ // CHECK: call void @_ZN5test31AD2Ev(
+ // CHECK: ret void
+
// CHECK: declare void @_ZN5test31BD2Ev(
// CHECK: declare void @_ZN5test31AD2Ev(
OpenPOWER on IntegriCloud