summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2015-02-24 21:45:33 +0000
committerJacques Pienaar <jpienaar@google.com>2015-02-24 21:45:33 +0000
commita50178c23ed2cb3f0f230ebb7670f47a5cc37bfd (patch)
tree1ec0818c4f9d7ce57b6d7b0711fc98f1d252a5ac /clang/lib/Frontend/CompilerInvocation.cpp
parent7c9442a6aefe268a7714d9ad7a94d6e15d6418f0 (diff)
downloadbcm5719-llvm-a50178c23ed2cb3f0f230ebb7670f47a5cc37bfd.tar.gz
bcm5719-llvm-a50178c23ed2cb3f0f230ebb7670f47a5cc37bfd.zip
CUDA: Add option to allow host device functions to call host functions
Commiting code from review http://reviews.llvm.org/D7841 llvm-svn: 230385
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index bfd9429dace..ef76cbfebd9 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -253,7 +253,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
for (unsigned i = 0, e = checkers.size(); i != e; ++i)
Opts.CheckersControlList.push_back(std::make_pair(checkers[i], enable));
}
-
+
// Go through the analyzer configuration options.
for (arg_iterator it = Args.filtered_begin(OPT_analyzer_config),
ie = Args.filtered_end(); it != ie; ++it) {
@@ -1393,6 +1393,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Args.hasArg(OPT_fcuda_is_device))
Opts.CUDAIsDevice = 1;
+ if (Args.hasArg(OPT_fcuda_allow_host_calls_from_host_device))
+ Opts.CUDAAllowHostCallsFromHostDevice = 1;
+
if (Opts.ObjC1) {
if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {
StringRef value = arg->getValue();
OpenPOWER on IntegriCloud