[llvm] r182293 - R600: Fix bug detected by GCC warning.

Benjamin Kramer benny.kra at gmail.com
Mon May 20 11:15:11 PDT 2013


On 20.05.2013, at 20:00, Matt Beaumont-Gay <matthewbg at google.com> wrote:

> On Mon, May 20, 2013 at 8:58 AM, Benjamin Kramer
> <benny.kra at googlemail.com> wrote:
>> Author: d0k
>> Date: Mon May 20 10:58:43 2013
>> New Revision: 182293
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=182293&view=rev
>> Log:
>> R600: Fix bug detected by GCC warning.
> 
> Awww. Clang, I am disappoint. File a PR for the missing diagnostic?

http://llvm.org/bugs/show_bug.cgi?id=16074

- Ben

> 
>> 
>> R600TextureIntrinsicsReplacer.cpp:232: warning: the address of ‘ArgsType’ will always evaluate as ‘true’
>> 
>> This doesn't have any effect on the output as a vararg intrinsic behaves the
>> same way as a non-vararg one.
>> 
>> Modified:
>>    llvm/trunk/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
>> 
>> Modified: llvm/trunk/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp?rev=182293&r1=182292&r2=182293&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp (original)
>> +++ llvm/trunk/lib/Target/R600/R600TextureIntrinsicsReplacer.cpp Mon May 20 10:58:43 2013
>> @@ -229,7 +229,7 @@ public:
>>       Int32Type,
>>       Int32Type,
>>     };
>> -    TexSign = FunctionType::get(V4f32Type, ArgsType);
>> +    TexSign = FunctionType::get(V4f32Type, ArgsType, /*isVarArg=*/false);
>>     Type *ArgsQType[] = {
>>       V4i32Type,
>>       Int32Type,
>> @@ -242,7 +242,7 @@ public:
>>       Int32Type,
>>       Int32Type,
>>     };
>> -    TexQSign = FunctionType::get(V4f32Type, ArgsQType);
>> +    TexQSign = FunctionType::get(V4f32Type, ArgsQType, /*isVarArg=*/false);
>>     return false;
>>   }
>> 
>> 
>> 
>> _______________________________________________
>> 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