aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f61a393..ff0df26 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1254,6 +1254,21 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
Opts.SSPBufferSize =
getLastArgIntValue(Args, OPT_stack_protector_buffer_size, 8, Diags);
+
+ Opts.StackProtectorGuard =
+ std::string(Args.getLastArgValue(OPT_mstack_protector_guard_EQ));
+
+ if (Arg *A = Args.getLastArg(OPT_mstack_protector_guard_offset_EQ)) {
+ StringRef Val = A->getValue();
+ unsigned Offset = Opts.StackProtectorGuardOffset;
+ Val.getAsInteger(10, Offset);
+ Opts.StackProtectorGuardOffset = Offset;
+ }
+
+ Opts.StackProtectorGuardReg =
+ std::string(Args.getLastArgValue(OPT_mstack_protector_guard_reg_EQ,
+ "none"));
+
Opts.StackRealignment = Args.hasArg(OPT_mstackrealign);
if (Arg *A = Args.getLastArg(OPT_mstack_alignment)) {
StringRef Val = A->getValue();