[llvm] r344395 - Replace assert() with llvm_unreachable because it's obviously a typo.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 12:50:24 PDT 2018


thanks!

On Fri, Oct 12, 2018 at 12:49 PM Rui Ueyama <ruiu at google.com> wrote:

> It's reverted as a whole in r344405, so looks like we don't have to worry
> about it anymore.
>
> On Fri, Oct 12, 2018 at 12:47 PM Kostya Serebryany <kcc at google.com> wrote:
>
>> it didn't help :(
>>
>> On Fri, Oct 12, 2018 at 12:37 PM Rui Ueyama <ruiu at google.com> wrote:
>>
>>> Hmm, is this my change? My change replaced assert() with
>>> llvm_unreachable() to fix that warning.
>>>
>>> On Fri, Oct 12, 2018 at 12:27 PM Kostya Serebryany <kcc at google.com>
>>> wrote:
>>>
>>>> this causes a warning (treated as error) and displeases the bots
>>>> <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/15955/steps/annotate/logs/stdio>
>>>> :
>>>> llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp:195:12: warning: implicit
>>>> conversion turns string literal into bool: 'const char [42]' to 'bool'
>>>> [-Wstring-conversion]
>>>>     assert("Invalid Die passed into BTFTypeEntryInt()");
>>>>     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> /usr/include/assert.h:89:5: note: expanded from macro 'assert'
>>>>   ((expr)
>>>>  \
>>>>     ^~~~
>>>>
>>>>
>>>> On Fri, Oct 12, 2018 at 11:31 AM Rui Ueyama via llvm-commits <
>>>> llvm-commits at lists.llvm.org> wrote:
>>>>
>>>>> Author: ruiu
>>>>> Date: Fri Oct 12 11:29:30 2018
>>>>> New Revision: 344395
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=344395&view=rev
>>>>> Log:
>>>>> Replace assert() with llvm_unreachable because it's obviously a typo.
>>>>>
>>>>> Modified:
>>>>>     llvm/trunk/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp
>>>>>
>>>>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp
>>>>> URL:
>>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp?rev=344395&r1=344394&r2=344395&view=diff
>>>>>
>>>>> ==============================================================================
>>>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp (original)
>>>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp Fri Oct 12
>>>>> 11:29:30 2018
>>>>> @@ -155,7 +155,7 @@ Die2BTFEntry::Die2BTFEntry(const DIE &Di
>>>>>    case BTF_KIND_VOLATILE:
>>>>>      break;
>>>>>    default:
>>>>> -    assert("Invalid Die passed into BTFTypeEntry()");
>>>>> +    llvm_unreachable("Invalid Die passed into BTFTypeEntry()");
>>>>>      break;
>>>>>    }
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at lists.llvm.org
>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181012/d942a284/attachment.html>


More information about the llvm-commits mailing list