[CUDA][Windows] Partial fix for bug 38811 (Step 2 of 3)
authorEvgeny Mankov <evgeny.mankov@gmail.com>
Fri, 15 Mar 2019 19:04:46 +0000 (19:04 +0000)
committerEvgeny Mankov <evgeny.mankov@gmail.com>
Fri, 15 Mar 2019 19:04:46 +0000 (19:04 +0000)
commit177301f04824ac781a49f4eba747ba10952119f3
tree932a027c3fd409bdccbf1dbc053271588818c1a6
parent614b1bea97d9154ea5427df9cc67cf526ae17cdd
[CUDA][Windows] Partial fix for bug 38811 (Step 2 of 3)

Partial fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows".

[Synopsis]
__sptr is a new Microsoft specific modifier (https://docs.microsoft.com/en-us/cpp/cpp/sptr-uptr?view=vs-2017).

[Solution]
Replace all `__sptr` occurrences with `__s` (and all `__cptr` with `__c` as well) to eliminate the below clang compilation error on Windows.

In file included from C:\GIT\LLVM\trunk\llvm-64-release-vs2017-15.9.5\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:162:
C:\GIT\LLVM\trunk\llvm-64-release-vs2017-15.9.5\dist\lib\clang\9.0.0\include\__clang_cuda_device_functions.h:524:33: error: expected expression
  return __nv_fast_sincosf(__a, __sptr, __cptr);
                                ^
Reviewed by: Artem Belevich

Differential Revision: http://reviews.llvm.org/D59423

llvm-svn: 356291
clang/lib/Headers/__clang_cuda_device_functions.h
clang/lib/Headers/__clang_cuda_libdevice_declares.h