[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 12:32:34 PST 2020


rsmith added a comment.
Herald added a subscriber: herhut.

This doesn't look quite right to me. I don't think we should treat the `delete this;` for a destructor as being emitted-for-device in any translation unit in which the vtable is marked used. (For example, if in your testcase `MSEmitDeletingDtor::CFileStream::CFileStream()` were a `__host__` function, I think you'd still diagnose, but presumably shouldn't do so, because the vtable -- and therefore `CFileStream::operator delete` -- is never referenced / emitted for the device.) Instead, I think we should treat the `delete this;` as being emitted in any translation unit in which the vtable itself is emitted-for-device. Presumably, this means you will need to model / track usage of the vtable itself in your "call graph".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70172/new/

https://reviews.llvm.org/D70172





More information about the cfe-commits mailing list