[llvm-commits] [llvm-gcc-4.2] r58724 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Evan Cheng
evan.cheng at apple.com
Tue Nov 4 14:58:57 PST 2008
On Nov 4, 2008, at 1:54 PM, Bill Wendling wrote:
> Author: void
> Date: Tue Nov 4 15:54:08 2008
> New Revision: 58724
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58724&view=rev
> Log:
> Update to use the enumerated values for --enable-stack-protector
> option.
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=58724&r1=58723&r2=58724&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Nov 4 15:54:08 2008
> @@ -167,9 +167,16 @@
> }
>
> if (flag_stack_protect > 0) {
> - std::string Arg("--enable-stack-protector=" +
> utostr(flag_stack_protect));
> + std::string Arg("--enable-stack-protector=");
> +
> + if (flag_stack_protect == 1)
> + Arg += "some";
> + else
> + Arg += "all";
It's a minor issue. But why not
if (flag_stack_protect == 1)
ArgStrings.push_back("--enable-stack-protector=some")
else
...
to avoid concatenating the strings?
Evan
>
> +
> ArgStrings.push_back(Arg);
> - Arg = "--ssp-buffer-size=" +
> utostr(PARAM_VALUE(PARAM_SSP_BUFFER_SIZE));
> + Arg = "--stack-protector-buffer-size=" +
> + utostr(PARAM_VALUE(PARAM_SSP_BUFFER_SIZE));
> ArgStrings.push_back(Arg);
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list