]> granicus.if.org Git - clang/commit
[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)
commitfc62308da45f483cd97bcf823f5a01b025f6a8ba
tree1f64c18c45c00d4a7575db925ac88eff13c992dd
parentc386253f5bb5a1f8a781e9eaedce21d413e40011
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/__clang_cuda_device_functions.h
lib/Headers/__clang_cuda_libdevice_declares.h