[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 25 14:56:59 PDT 2018
ahatanak added a comment.
The original comment said "call sized device delete even though host has preferable non-sized version", but it seems that the non-sized host version 'T::operator delete(void*)' is being called in the IR, not the sized device version of delete. Is that a bug in overload resolution?
This is the command I used:
"clang -cc1 -internal-isystem --std=c++11 -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - test.cu"
$ cat test.cu
#define __constant__ __attribute__((constant))
#define __device__ __attribute__((device))
#define __host__ __attribute__((host))
typedef __SIZE_TYPE__ size_t;
struct T {
__host__ void operator delete(void*);
__device__ void operator delete(void*, size_t);
};
__host__ __device__ void class_specific_delete(T *t) {
delete t;
}
Repository:
rC Clang
https://reviews.llvm.org/D47757
More information about the cfe-commits
mailing list