From e9d11dbfe1f3286c5f8a2f2fc8ac759f63890655 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Mon, 5 Dec 2011 23:05:23 +0000 Subject: Add -mstack-alignment=X and fix -mstackrealign handling now that the backend options are gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145868 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 6b5c8cf5b5..b89bf0808c 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1114,6 +1114,11 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.CoverageFile = Args.getLastArgValue(OPT_coverage_file); Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir); Opts.LinkBitcodeFile = Args.getLastArgValue(OPT_mlink_bitcode_file); + Opts.RealignStack = Args.hasArg(OPT_mstackrealign); + if (Arg *A = Args.getLastArg(OPT_mstack_alignment)) { + StringRef Val = A->getValue(Args); + Val.getAsInteger(10, Opts.StackAlignment); + } if (Arg *A = Args.getLastArg(OPT_fobjc_dispatch_method_EQ)) { StringRef Name = A->getValue(Args); -- cgit v1.2.3-18-g5258