summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-18 02:56:14 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-18 02:56:14 +0000
commit7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c (patch)
treecf12fb2284f5fc7e93e2cf14b6d186631d0cdad2 /clang/lib/Frontend/CompilerInvocation.cpp
parent7c9cc461651e1acb8c1c9c19141d8477c86c6976 (diff)
downloadbcm5719-llvm-7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c.tar.gz
bcm5719-llvm-7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c.zip
The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error; it's not really worthwhile doing this "right", i.e. in Sema, because IR gen knows a lot of tricks beyond what the constant evaluator knows. llvm-svn: 127854
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 859eb74a8a0..31fcee2de88 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -127,6 +127,8 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts,
Res.push_back("-fno-merge-all-constants");
if (Opts.NoCommon)
Res.push_back("-fno-common");
+ if (Opts.ForbidGuardVariables)
+ Res.push_back("-fforbid-guard-variables");
if (Opts.NoImplicitFloat)
Res.push_back("-no-implicit-float");
if (Opts.OmitLeafFramePointer)
@@ -896,6 +898,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.LimitDebugInfo = Args.hasArg(OPT_flimit_debug_info);
Opts.DisableLLVMOpts = Args.hasArg(OPT_disable_llvm_optzns);
Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
+ Opts.ForbidGuardVariables = Args.hasArg(OPT_fforbid_guard_variables);
Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants);
OpenPOWER on IntegriCloud