]> granicus.if.org Git - clang/commit
[CUDA] Make all host-side shadows of device-side variables undef.
authorArtem Belevich <tra@google.com>
Thu, 13 Dec 2018 21:43:04 +0000 (21:43 +0000)
committerArtem Belevich <tra@google.com>
Thu, 13 Dec 2018 21:43:04 +0000 (21:43 +0000)
commit1323eaec107f669c1b6b1730e03c79b835b2baf8
tree51902cb6c0cd4b0c0a67ce9cef05a4bba8e53822
parent3c2cb358a7df218e90c25191a1ee736ae4045c4a
[CUDA] Make all host-side shadows of device-side variables undef.

The host-side code can't (and should not) access the values that may
only exist on the device side. E.g. address of a __device__ function
does not exist on the host side as we don't generate the code for it there.

Differential Revision: https://reviews.llvm.org/D55663

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349087 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/device-var-init.cu