]> granicus.if.org Git - clang/commit
Create a frontend flag to disable CUDA cross-target call checks
authorEli Bendersky <eliben@google.com>
Wed, 15 Apr 2015 22:27:06 +0000 (22:27 +0000)
committerEli Bendersky <eliben@google.com>
Wed, 15 Apr 2015 22:27:06 +0000 (22:27 +0000)
commitaedebc234574f6c0df5ebd950e4e3970854b0a4a
tree1cb5563419ad01919838cc3a07917fa5b90da078
parent06bfa567220725ba21f44ec0c3599d34e9d59d29
Create a frontend flag to disable CUDA cross-target call checks

For CUDA source, Sema checks that the targets of call expressions make sense
(e.g. a host function can't call a device function).

Adding a flag that lets us skip this check. Motivation: for source-to-source
translation tools that have to accept code that's not strictly kosher CUDA but
is still accepted by nvcc. The source-to-source translation tool can then fix
the code and leave calls that are semantically valid for the actual compilation
stage.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235049 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
lib/Frontend/CompilerInvocation.cpp
lib/Sema/SemaCUDA.cpp
test/SemaCUDA/function-target-disabled-check.cu [new file with mode: 0644]