HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__">;
def cl_mad_enable : Flag<"-cl-mad-enable">,
HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">;
+def cl_std_EQ : Joined<"-cl-std=">,
+ HelpText<"OpenCL language standard to compile for">;
<< A->getAsString(Args) << A->getValue(Args);
}
+ if (const Arg *A = Args.getLastArg(OPT_cl_std_EQ)) {
+ if (strcmp(A->getValue(Args), "CL1.1") != 0) {
+ Diags.Report(diag::err_drv_invalid_value)
+ << A->getAsString(Args) << A->getValue(Args);
+ }
+ }
+
CompilerInvocation::setLangDefaults(Opts, IK, LangStd);
// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension