]> granicus.if.org Git - clang/commit
CUDA: mark the target of implicit intrinsics properly
authorEli Bendersky <eliben@google.com>
Tue, 30 Sep 2014 17:38:34 +0000 (17:38 +0000)
committerEli Bendersky <eliben@google.com>
Tue, 30 Sep 2014 17:38:34 +0000 (17:38 +0000)
commitd5b7fbea205673f434337166967b580d2a6de6cb
treea81dce9bb24ab74edf827174daf95a41f32c759e
parent9855068c81e0d21f2696339d90123ae013d71e20
CUDA: mark the target of implicit intrinsics properly

r218624 implemented target inference for implicit special members. However,
other entities can be implicit - for example intrinsics. These can not have
inference running on them, so they should be marked host device as before. This
is the safest and most flexible setting, since by construction these functions
don't invoke anything, and we'd like them to be invokable from both host and
device code. LLVM's intrinsics definitions (where these intrinsics come from in
the case of CUDA/NVPTX) have no notion of target, so both host and device
intrinsics can be supported this way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218688 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaCUDA.cpp
test/SemaCUDA/implicit-intrinsic.cu [new file with mode: 0644]