diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-04 01:51:40 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-04 01:51:40 +0000 |
commit | fafa66500b331fca69bbe0298fd95737e1f95b3f (patch) | |
tree | 4d3ea1a21f5f9c3b80426451ea17ab28041573a5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 422542625b96f267612172e5427cdea7fbf59f0f (diff) | |
download | bcm5719-llvm-fafa66500b331fca69bbe0298fd95737e1f95b3f.tar.gz bcm5719-llvm-fafa66500b331fca69bbe0298fd95737e1f95b3f.zip |
Implement -cl-std=
llvm-svn: 120882
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f7656425cc6..7dbc8f23203 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -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 |