mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 00:16:05 +00:00
Implement -cl-std=
llvm-svn: 120882
This commit is contained in:
parent
422542625b
commit
fafa66500b
@ -609,3 +609,5 @@ def cl_fast_relaxed_math : Flag<"-cl-fast-relaxed-math">,
|
||||
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">;
|
||||
|
@ -1322,6 +1322,13 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
||||
<< 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user