Currently, there is some refactoring needed in existing interface of OpenCL option
settings to support OpenCL C 3.0. The problem is that OpenCL extensions and features
are not only determined by the target platform but also by the OpenCL version.
Also, there are core extensions/features which are supported unconditionally in
specific OpenCL C version. In fact, these rules are not being followed for all targets.
For example, there are some targets (as nvptx and r600) which don't support
OpenCL C 2.0 core features (nvptx.languageOptsOpenCL.cl, r600.languageOptsOpenCL.cl).
After the change there will be explicit differentiation between optional core and core
OpenCL features which allows giving diagnostics if target doesn't support any of
necessary core features for specific OpenCL version.
This patch also eliminates OpenCLOptions instance duplication from TargetOptions.
OpenCLOptions instance should take place in Sema as it's going to be modified
during parsing. Removing this duplication will also allow to generally simplify
OpenCLOptions class for parsing purposes.
I guess you mean that this extension is not against a specific version i.e. applies to all versions?