diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2012-09-12 13:51:14 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2012-09-12 13:51:14 +0000 |
commit | 53b43a78d575e9e8d0af7a3f4b0a744679d65994 (patch) | |
tree | af53347468a89e7615bf1fed6ae513bcd40f3597 /lib/Driver/Tools.cpp | |
parent | 92b7c3996457660b37e4665542229b7b4e736fd0 (diff) |
Claim --param ssp-buffer-size, even if the stack protector is not
active.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 25dd0824bc..c0ce50437f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2346,17 +2346,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (StackProtectorLevel) { CmdArgs.push_back("-stack-protector"); CmdArgs.push_back(Args.MakeArgString(Twine(StackProtectorLevel))); + } - // --param ssp-buffer-size= - for (arg_iterator it = Args.filtered_begin(options::OPT__param), - ie = Args.filtered_end(); it != ie; ++it) { - StringRef Str((*it)->getValue(Args)); - if (Str.startswith("ssp-buffer-size=")) { + // --param ssp-buffer-size= + for (arg_iterator it = Args.filtered_begin(options::OPT__param), + ie = Args.filtered_end(); it != ie; ++it) { + StringRef Str((*it)->getValue(Args)); + if (Str.startswith("ssp-buffer-size=")) { + if (StackProtectorLevel) { CmdArgs.push_back("-stack-protector-buffer-size"); // FIXME: Verify the argument is a valid integer. CmdArgs.push_back(Args.MakeArgString(Str.drop_front(16))); - (*it)->claim(); } + (*it)->claim(); } } |