summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCUDA
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-10-03 16:48:23 +0000
committerJustin Lebar <jlebar@google.com>2016-10-03 16:48:23 +0000
commite060feb7b1a98bcd083cf53ea3c05bc9eda432bb (patch)
tree763f4e6edf374e0a6a50c19abd244bf1179ca13a /clang/test/CodeGenCUDA
parentd27a21874b3d83bf0695eea90b6ba5aa3f600c88 (diff)
downloadbcm5719-llvm-e060feb7b1a98bcd083cf53ea3c05bc9eda432bb.tar.gz
bcm5719-llvm-e060feb7b1a98bcd083cf53ea3c05bc9eda432bb.zip
[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 llvm-svn: 283120
Diffstat (limited to 'clang/test/CodeGenCUDA')
-rw-r--r--clang/test/CodeGenCUDA/function-overload.cu8
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/test/CodeGenCUDA/function-overload.cu b/clang/test/CodeGenCUDA/function-overload.cu
index 380304af822..c82b2e96f6c 100644
--- a/clang/test/CodeGenCUDA/function-overload.cu
+++ b/clang/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
OpenPOWER on IntegriCloud