summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/cxx-irgen.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-08-07 18:53:08 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-08-07 18:53:08 +0000
commit4d2357948b6a5c4e232fa988c364e4dcd0193288 (patch)
treeb3753f028bcea5ed0cb09da6ea9cff997583a1b1 /clang/test/Modules/cxx-irgen.cpp
parent54c340b76add6aa394c0564252df893698f9678f (diff)
downloadbcm5719-llvm-4d2357948b6a5c4e232fa988c364e4dcd0193288.tar.gz
bcm5719-llvm-4d2357948b6a5c4e232fa988c364e4dcd0193288.zip
[modules] When emitting an update record containing the body of a destructor,
also emit the updated 'operator delete' looked up for that destructor. Switch from UpdateDecl to an actual update record when this happens due to implicitly defining a special member function and unify this code path and the one for instantiating a function definition. llvm-svn: 215132
Diffstat (limited to 'clang/test/Modules/cxx-irgen.cpp')
-rw-r--r--clang/test/Modules/cxx-irgen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Modules/cxx-irgen.cpp b/clang/test/Modules/cxx-irgen.cpp
index 9fb38cedacf..7bb12871622 100644
--- a/clang/test/Modules/cxx-irgen.cpp
+++ b/clang/test/Modules/cxx-irgen.cpp
@@ -18,6 +18,9 @@ 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(
+
namespace ImplicitSpecialMembers {
// CHECK-LABEL: define {{.*}} @_ZN22ImplicitSpecialMembers1DC2EOS0_(
// CHECK: call {{.*}} @_ZN22ImplicitSpecialMembers1AC1ERKS0_(
@@ -45,6 +48,12 @@ namespace ImplicitSpecialMembers {
D d3(static_cast<D&&>(d1));
}
+namespace OperatorDeleteLookup {
+ // Trigger emission of B's vtable and deleting dtor.
+ // This requires us to know what operator delete was selected.
+ void g() { f(); }
+}
+
// CHECK: define available_externally {{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
// CHECK: attributes #[[ALWAYS_INLINE]] = {{.*}} alwaysinline
OpenPOWER on IntegriCloud