[llvm] r250929 - Silence Visual C++ warning in function summary parsing code (NFC)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 12:49:23 PDT 2015


On Wed, Oct 21, 2015 at 12:33 PM, Aaron Ballman via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Wed, Oct 21, 2015 at 3:25 PM, Teresa Johnson via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: tejohnson
> > Date: Wed Oct 21 14:25:14 2015
> > New Revision: 250929
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=250929&view=rev
> > Log:
> > Silence Visual C++ warning in function summary parsing code (NFC)
> >
> > Modified:
> >     llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
> >
> > Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=250929&r1=250928&r2=250929&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
> > +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Oct 21 14:25:14
> 2015
> > @@ -5538,6 +5538,7 @@ std::error_code FunctionIndexBitcodeRead
> >    // importing is added so that it can be tested.
> >    SmallVector<uint64_t, 64> Record;
> >    switch (Stream.readRecord(Entry.ID, Record)) {
> > +    case bitc::FS_CODE_COMBINED_ENTRY:
> >      default:
> >        return error("Invalid record");
>
> What warning is this silencing? It seems like the correct approach is
> to remove the switch entirely.
>

+1 - this looks like it should just be:

if (Stream.readRecord(...))
  return error(...);


>
> ~Aaron
>
> >    }
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> _______________________________________________
> 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/20151021/5a0d9e7e/attachment.html>


More information about the llvm-commits mailing list