[llvm-commits] [llvm] r149849 - in /llvm/trunk: include/llvm/ include/llvm/ADT/ include/llvm/Analysis/ include/llvm/Bitcode/ include/llvm/CodeGen/ include/llvm/CodeGen/PBQP/ include/llvm/ExecutionEngine/ include/llvm/MC/ include/llvm/Support/ inc

Craig Topper craig.topper at gmail.com
Sun Feb 5 23:36:03 PST 2012


I'll get those cleaned up.

On Sun, Feb 5, 2012 at 10:32 PM, David Blaikie <dblaikie at gmail.com> wrote:

> > Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=149849&r1=149848&r2=149849&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
> > +++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Sun Feb  5 16:14:15
> 2012
> > @@ -128,9 +128,8 @@
> >                  Other.Contents.Order.isNormalMemory &&
> >                Contents.Order.isMustAlias ==
> Other.Contents.Order.isMustAlias &&
> >                Contents.Order.isArtificial ==
> Other.Contents.Order.isArtificial;
> > +      default: llvm_unreachable("Invalid dependency kind!");
> >       }
> > -      assert(0 && "Invalid dependency kind!");
> > -      return false;
>
> If you could keep trailing asserts like this as trailing (though feel
> free to convert them from assert to llvm_unreachable) that would be
> great. Adding a default to a fully-covered switch like this is
> unhelpful as it suppresses -Wswitch (which warns when a
> switch-over-enum is not fully covered) should a new element be added
> to the enumeration.
>
> Clang has a warning I recently added (-Wcovered-switch-default) that
> catches this case & your changes have caused several violations of
> this warning across LLVM.
>
> Let me know if you'd prefer me to fix them up.
>
> - David
>
>
>
-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120205/21090afc/attachment.html>


More information about the llvm-commits mailing list