[llvm-commits] [llvm] r148715 - /llvm/trunk/lib/Object/ELFObjectFile.cpp

Matt Beaumont-Gay matthewbg at google.com
Tue Jan 24 11:47:35 PST 2012


r148849

On Mon, Jan 23, 2012 at 21:19, Nick Lewycky <nicholas at mxc.ca> wrote:
> Matt Beaumont-Gay wrote:
>>
>> Author: matthewbg
>> Date: Mon Jan 23 12:46:04 2012
>> New Revision: 148715
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=148715&view=rev
>> Log:
>> Silence warnings in -asserts build
>>
>> Modified:
>>     llvm/trunk/lib/Object/ELFObjectFile.cpp
>>
>> Modified: llvm/trunk/lib/Object/ELFObjectFile.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ELFObjectFile.cpp?rev=148715&r1=148714&r2=148715&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Object/ELFObjectFile.cpp (original)
>> +++ llvm/trunk/lib/Object/ELFObjectFile.cpp Mon Jan 23 12:46:04 2012
>> @@ -1675,6 +1675,9 @@
>>          bool isBinary = isa<Binary>(result);
>>          bool isDyld = isa<DyldELFObject<support::little, true>
>>  >(result);
>>          bool isFile = isa<ELFObjectFile<support::little, true>
>>  >(result);
>> +        (void)isBinary;
>> +        (void)isDyld;
>> +        (void)isFile;
>>          assert(isBinary&&  isDyld&&  isFile&&
>>              "Type inquiry failed for ELF object!");
>
>
> Please sink these values into the assert, even when it is this much code.
> (Or in this case, how about multiple asserts, one for each "type inquiry"?)
>
> Nick
>
>
>>          return result;
>> @@ -1695,6 +1698,9 @@
>>        bool isBinary = isa<Binary>(result);
>>        bool isDyld = isa<DyldELFObject<support::little, true>  >(result);
>>        bool isFile = isa<ELFObjectFile<support::little, true>  >(result);
>> +      (void)isBinary;
>> +      (void)isDyld;
>> +      (void)isFile;
>>        assert(isBinary&&  isFile&&  !isDyld&&
>>            "Type inquiry failed for ELF object!");
>>        return result;
>>
>>
>> _______________________________________________
>> 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