[llvm-commits] [llvm-gcc-4.2] r58724 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Bill Wendling
isanbard at gmail.com
Tue Nov 4 16:02:14 PST 2008
On Tue, Nov 4, 2008 at 2:58 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
> 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?
>
Sure. :-)
-bw
More information about the llvm-commits
mailing list