diff options
author | Justin Lebar <jlebar@google.com> | 2016-10-03 16:48:23 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-10-03 16:48:23 +0000 |
commit | 534b63721ae410c95b33d99cf378b338100f8d33 (patch) | |
tree | ed29bcfbbe70f9d676569bca9a83133f01cf6712 /test/CodeGenCUDA | |
parent | b3fa84259ca68feb9379c001a30e839ed376145b (diff) |
[CUDA] Disallow overloading destructors.
Summary:
We'd attempted to allow this, but turns out we were doing a very bad
job. :)
Making this work properly would be a giant change in clang. For
example, we'd need to make CXXRecordDecl::getDestructor()
context-sensitive, because the destructor you end up with depends on
where you're calling it from.
For now (and hopefully for ever), just disallow overloading of
destructors in CUDA.
Reviewers: rsmith
Subscribers: cfe-commits, tra
Differential Revision: https://reviews.llvm.org/D24571
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCUDA')
-rw-r--r-- | test/CodeGenCUDA/function-overload.cu | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/test/CodeGenCUDA/function-overload.cu b/test/CodeGenCUDA/function-overload.cu index 380304af82..c82b2e96f6 100644 --- a/test/CodeGenCUDA/function-overload.cu +++ b/test/CodeGenCUDA/function-overload.cu @@ -16,8 +16,6 @@ int x; struct s_cd_dh { __host__ s_cd_dh() { x = 11; } __device__ s_cd_dh() { x = 12; } - __host__ ~s_cd_dh() { x = 21; } - __device__ ~s_cd_dh() { x = 22; } }; struct s_cd_hd { @@ -38,7 +36,6 @@ void wrapper() { // CHECK-BOTH: call void @_ZN7s_cd_hdC1Ev // CHECK-BOTH: call void @_ZN7s_cd_hdD1Ev( - // CHECK-BOTH: call void @_ZN7s_cd_dhD1Ev( } // CHECK-BOTH: ret void @@ -56,8 +53,3 @@ void wrapper() { // CHECK-BOTH: define linkonce_odr void @_ZN7s_cd_hdD2Ev( // CHECK-BOTH: store i32 32, // CHECK-BOTH: ret void - -// CHECK-BOTH: define linkonce_odr void @_ZN7s_cd_dhD2Ev( -// CHECK-HOST: store i32 21, -// CHECK-DEVICE: store i32 22, -// CHECK-BOTH: ret void |