tra added inline comments.

================
Comment at: lib/Headers/__clang_cuda_math_forward_declares.h:30-38
+#ifndef _OPENMP
+__DEVICE__ long abs(long);
+__DEVICE__ long long abs(long long);
+#else
+#ifndef __cplusplus
 __DEVICE__ long abs(long);
 __DEVICE__ long long abs(long long);
----------------
I'm not quite sure what's the idea here. It may be worth adding a comment.

It could also be expressed somewhat simpler:

```
#if !(defined(_OPENMP) && defined(__cplusplus))
...
#endif
```



================
Comment at: lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h:10
+
+#if defined(__NVPTX__) && defined(_OPENMP)
+
----------------
You may want to add include guards.

I'd also make inclusion of the file in non-openmp compilation an error, if it 
makes sense for OpenMP. It does for CUDA.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61765



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to