summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-01-26 17:47:20 +0000
committerJustin Lebar <jlebar@google.com>2016-01-26 17:47:20 +0000
commit1eac5948dbf95abab5af7162dea7cf1d34585373 (patch)
tree491efb0080da4a7b42490a615c7b0beb23215fb1 /clang/lib/Frontend/CompilerInvocation.cpp
parent329860e495667aa3caab095f5e6032ffc4d4dcfd (diff)
downloadbcm5719-llvm-1eac5948dbf95abab5af7162dea7cf1d34585373.tar.gz
bcm5719-llvm-1eac5948dbf95abab5af7162dea7cf1d34585373.zip
[CUDA] Add -fcuda-allow-variadic-functions.
Summary: Turns out the variadic function checking added in r258643 was too strict for some existing users; give them an escape valve. When -fcuda-allow-variadic-functions is passed, the front-end makes no attempt to disallow C-style variadic functions. Calls to va_arg are still not allowed. Reviewers: tra Subscribers: cfe-commits, jhen, echristo, bkramer Differential Revision: http://reviews.llvm.org/D16559 llvm-svn: 258822
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index d0b8b27b052..a202996a79a 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1521,6 +1521,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Args.hasArg(OPT_fcuda_target_overloads))
Opts.CUDATargetOverloads = 1;
+ if (Args.hasArg(OPT_fcuda_allow_variadic_functions))
+ Opts.CUDAAllowVariadicFunctions = 1;
+
if (Opts.ObjC1) {
if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {
StringRef value = arg->getValue();
OpenPOWER on IntegriCloud