summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-01-20 19:45:50 +0000
committerHans Wennborg <hans@hanshq.net>2015-01-20 19:45:50 +0000
commit77dc236605aa95a542ea68d7430a9e5ddb30123b (patch)
tree464d99fff9f115da92634aeeb2b53bde45413a6c /clang/lib/Frontend/CompilerInvocation.cpp
parent6b77455f819dfd587bd6927b7e1c705a6d3df36d (diff)
downloadbcm5719-llvm-77dc236605aa95a542ea68d7430a9e5ddb30123b.tar.gz
bcm5719-llvm-77dc236605aa95a542ea68d7430a9e5ddb30123b.zip
Implement command line options for stack probe space
This code adds the -mstack-probe-size command line option and implements the /Gs compiler switch for clang-cl. This should fix http://llvm.org/bugs/show_bug.cgi?id=21896 Patch by Andrew H! Differential Revision: http://reviews.llvm.org/D6685 llvm-svn: 226601
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 921a0d2d80e..dd1a60611aa 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -523,6 +523,13 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.StackAlignment = StackAlignment;
}
+ if (Arg *A = Args.getLastArg(OPT_mstack_probe_size)) {
+ StringRef Val = A->getValue();
+ unsigned StackProbeSize = Opts.StackProbeSize;
+ Val.getAsInteger(0, StackProbeSize);
+ Opts.StackProbeSize = StackProbeSize;
+ }
+
if (Arg *A = Args.getLastArg(OPT_fobjc_dispatch_method_EQ)) {
StringRef Name = A->getValue();
unsigned Method = llvm::StringSwitch<unsigned>(Name)
OpenPOWER on IntegriCloud