diff options
author | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 14:08:59 +0300 |
---|---|---|
committer | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 18:10:25 +0300 |
commit | acc58504952f0e2ca48a44d868f684e3b135dd34 (patch) | |
tree | c49cd7efc0cb3833fa8c4a593925d714b2a876ef /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a7a39ec886a03cbf70ef187c49370f63514ae931 (diff) | |
download | llvm-acc58504952f0e2ca48a44d868f684e3b135dd34.zip llvm-acc58504952f0e2ca48a44d868f684e3b135dd34.tar.gz llvm-acc58504952f0e2ca48a44d868f684e3b135dd34.tar.bz2 |
[OpenCL] Add support of __opencl_c_pipes feature macro.
'pipe' keyword is introduced in OpenCL C 2.0: so do checks for OpenCL C version while
parsing and then later on check for language options to construct actual pipe. This feature
requires support of __opencl_c_generic_address_space, so diagnostics for that is provided as well.
This is the same patch as in D106748 but with a tiny fix in checking of diagnostic messages.
Also added tests when program scope global variables are not supported.
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D107154
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ae5c5d4..39335c4 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3173,7 +3173,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK, Opts.ZVector = 0; Opts.setDefaultFPContractMode(LangOptions::FPM_On); Opts.OpenCLCPlusPlus = Opts.CPlusPlus; - Opts.OpenCLPipe = Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200; + Opts.OpenCLPipes = Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200; Opts.OpenCLGenericAddressSpace = Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200; |