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 | 91252d115bdb6f937192a8dbc86c5abe00101436 (patch) | |
tree | c9b0a48c911d6fb571a93d21c6684a9c5d37d394 /lib/Frontend/CompilerInvocation.cpp | |
parent | 4400cb8c548a90c472444b57690117563f4be195 (diff) |
Implement -cl-std=
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index f7656425cc..7dbc8f2320 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/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 |