[cfe-commits] r163705 - /cfe/trunk/lib/Driver/Tools.cpp
Joerg Sonnenberger
joerg at bec.de
Wed Sep 12 06:51:14 PDT 2012
Author: joerg
Date: Wed Sep 12 08:51:14 2012
New Revision: 163705
URL: http://llvm.org/viewvc/llvm-project?rev=163705&view=rev
Log:
Claim --param ssp-buffer-size, even if the stack protector is not
active.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=163705&r1=163704&r2=163705&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Sep 12 08:51:14 2012
@@ -2346,17 +2346,19 @@
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();
}
}
More information about the cfe-commits
mailing list