[clang] [Clang] [CUDA] Provide device-side definitions of `__cxa_[pure|deleted]_virtual()` (PR #217427)
Ambrose Leeb via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 11:48:01 PDT 2026
Sirraide wrote:
> I think we should just change the emission in `clang` for these targets to instead be a verbose trap for all similar 'GPU' targets. What do you think? Possibly just a weak function of the same name so that it can still be overridden by a 'real' GPU libc++abi.
So have clang emit a weak definition of `__cxa_pure_virtual`/`__cxa_deleted_virtual` in device code? That’s what I was going to do but I wasn’t sure if we wanted to go in that direction. But yes, that would also solve the issue of not being able to test this properly w/o including the header (and thereby, these definitions), so I think I’ll do that if no-one is opposed to this approach
https://github.com/llvm/llvm-project/pull/217427
More information about the cfe-commits
mailing list