[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 12:43:50 PST 2021


tra added inline comments.


================
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:31
+#ifdef __OPENMP_NVPTX__
+#define DEVICE
+#else
----------------
You should use `__` prefix to avoid unintentional clashes with user-defined macros.
`__DEVICE__` ?


================
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:124
 #undef __CUDA_DISALLOW_BUILTINVAR_ACCESS
 #undef __DELETE
 
----------------
You need to `#undef` the DEVICE macro here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94884



More information about the cfe-commits mailing list