diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:17:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:17:51 +0000 |
commit | e7145dcb9f6563389ebbfa0572ef7589bdd94b1b (patch) | |
tree | b1b30c4998f6e9769784be87d402e4f8db13e34d /contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 3ca95b020283db6244cab92ede73c969253b6a31 (diff) | |
parent | 7fd6ba58d980ec2bf312a80444948501dd27d020 (diff) |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp index 301916422564..1e9e57afb6bd 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -60,25 +60,25 @@ clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList, } // We expect to get back exactly one command job, if we didn't something - // failed. CUDA compilation is an exception as it creates multiple jobs. If - // that's the case, we proceed with the first job. If caller needs particular - // CUDA job, it should be controlled via --cuda-{host|device}-only option - // passed to the driver. + // failed. Offload compilation is an exception as it creates multiple jobs. If + // that's the case, we proceed with the first job. If caller needs a + // particular job, it should be controlled via options (e.g. + // --cuda-{host|device}-only for CUDA) passed to the driver. const driver::JobList &Jobs = C->getJobs(); - bool CudaCompilation = false; + bool OffloadCompilation = false; if (Jobs.size() > 1) { for (auto &A : C->getActions()){ // On MacOSX real actions may end up being wrapped in BindArchAction if (isa<driver::BindArchAction>(A)) - A = *A->begin(); - if (isa<driver::CudaDeviceAction>(A)) { - CudaCompilation = true; + A = *A->input_begin(); + if (isa<driver::OffloadAction>(A)) { + OffloadCompilation = true; break; } } } if (Jobs.size() == 0 || !isa<driver::Command>(*Jobs.begin()) || - (Jobs.size() > 1 && !CudaCompilation)) { + (Jobs.size() > 1 && !OffloadCompilation)) { SmallString<256> Msg; llvm::raw_svector_ostream OS(Msg); Jobs.Print(OS, "; ", true); |