[Lldb-commits] [lldb] r190069 - OptionValueProperties::DeepCopy (): return empty value to avoid compilation error on MSVC (even if assert).

Virgile Bello virgile.bello at gmail.com
Fri Sep 6 01:15:57 PDT 2013


Good to know, I will fix that then!


On Fri, Sep 6, 2013 at 11:18 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:

> On Thu, Sep 5, 2013 at 7:15 PM, Virgile Bello <virgile.bello at gmail.com>
> wrote:
> > Problem is not runtime but compile time. In MSVC, such a code doesn't
> > compile:
> >
> > int test() {  assert(false); }
> > error C4716: 'test' : must return a value
> >
> > So from what I understood of llvm_unreachable, it woulnd't help either
> since
> > it's just a replacement of assert that also doesn't return anything.
>
> Unlike assert, llvm_unreachable is a function marked with a noreturn
> attribute.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130906/a75ec989/attachment.html>


More information about the lldb-commits mailing list