[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 10:39:48 PDT 2019
rjmccall added a comment.
If you're interested in working on this, great. I actually think there's zero reason to emit a non-null argument here on any target unless we're going to use the destructor as the function pointer — but we can do that on every Itanium target, so we should. So where we want to be is probably:
- use the complete-object destructor and the object pointer as its argument when destroying a (non-array) object of C++ class type
- otherwise use a custom function that materializes the object pointer on its own and uses a null pointer as the argument
And then the address-spaces tweak to that is that we use the second option when we either (1) the destructor isn't in the `__cxa_atexit` address space or (2) the object pointer can't be converted to that address space.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62413/new/
https://reviews.llvm.org/D62413
More information about the cfe-commits
mailing list