[Openmp-commits] [PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 16 15:30:35 PDT 2021


jdoerfert added inline comments.


================
Comment at: clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h:20
+// need to `include <new>`.
+#include <new>
+#endif
----------------
JonChesterfield wrote:
> I think there are legitimate use cases for writing code that doesn't include new. Can we add the forms that are meant to be available without the include here, instead of just pulling in all new?
Hm, what forms would you not like to see in the code by default, and why?



================
Comment at: clang/test/Headers/Inputs/include/cstdlib:5
 
+void *malloc(size_t);
+void free(void*);
----------------
JonChesterfield wrote:
> These are in stdlib just above, no? Possibly with noexcept tags
They are not, this is the sham layer for testing, but you are so far correct that they should be. I'll move them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100620



More information about the Openmp-commits mailing list