diff options
author | Alexey Bader <alexey.bader@intel.com> | 2020-02-27 16:23:54 +0300 |
---|---|---|
committer | Alexey Bader <alexey.bader@intel.com> | 2020-02-27 16:23:54 +0300 |
commit | 740ed617f7d4d16e7883636c5eff994f8be7eba4 (patch) | |
tree | 3e4939f2d65bab7e8b5a7af4ce7d93a04307cf3d /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f64e457cb75b61f6566de8327a1bfae498d5a296 (diff) | |
download | llvm-740ed617f7d4d16e7883636c5eff994f8be7eba4.zip llvm-740ed617f7d4d16e7883636c5eff994f8be7eba4.tar.gz llvm-740ed617f7d4d16e7883636c5eff994f8be7eba4.tar.bz2 |
Revert "[SYCL] Driver option to select SYCL version"
This reverts commit bd97704eaaaab5a95ecb048ce343c1a4be5d94e5.
It broke tests on mac: http://45.33.8.238/mac/9011/step_7.txt
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 76f63d0..9cc41c9 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2535,24 +2535,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, LangStd = OpenCLLangStd; } - Opts.SYCL = Args.hasArg(options::OPT_fsycl); - Opts.SYCLIsDevice = Opts.SYCL && Args.hasArg(options::OPT_fsycl_is_device); - if (Opts.SYCL) { - // -sycl-std applies to any SYCL source, not only those containing kernels, - // but also those using the SYCL API - if (const Arg *A = Args.getLastArg(OPT_sycl_std_EQ)) { - Opts.SYCLVersion = llvm::StringSwitch<unsigned>(A->getValue()) - .Cases("2017", "1.2.1", "121", "sycl-1.2.1", 2017) - .Default(0U); - - if (Opts.SYCLVersion == 0U) { - // User has passed an invalid value to the flag, this is an error - Diags.Report(diag::err_drv_invalid_value) - << A->getAsString(Args) << A->getValue(); - } - } - } - Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header); Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins); @@ -3154,6 +3136,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, << Opts.OMPHostIRFile; } + Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device); + // Set CUDA mode for OpenMP target NVPTX if specified in options Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() && Args.hasArg(options::OPT_fopenmp_cuda_mode); |