[llvm] r311129 - Fix warning about covered switch default.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 15:40:06 PDT 2017
Yea that's not a bad idea, thanks for the suggestion.
On Thu, Aug 17, 2017 at 3:33 PM Justin Bogner <mail at justinbogner.com> wrote:
> Zachary Turner via llvm-commits <llvm-commits at lists.llvm.org> writes:
> > Author: zturner
> > Date: Thu Aug 17 15:20:15 2017
> > New Revision: 311129
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=311129&view=rev
> > Log:
> > Fix warning about covered switch default.
>
> I feel like removing the default and returning "Unknown Symbol..."
> instead of (the unreachable) `return ""` after the switch would be
> slightly clearer.
>
> > Modified:
> > llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
> >
> > Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
> > URL:
> >
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=311129&r1=311128&r2=311129&view=diff
> >
> ==============================================================================
> >
> > --- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
> > +++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Thu Aug 17
> 15:20:15 2017
> > @@ -25,7 +25,7 @@ using namespace llvm::codeview;
> > using namespace llvm::pdb;
> >
> > static std::string getSymbolKindName(SymbolKind K) {
> > - switch (K) {
> > + switch (uint32_t(K)) {
> > #define SYMBOL_RECORD(EnumName, value, name)
> \
> > case EnumName:
> \
> > return #EnumName;
> >
> >
> > _______________________________________________
> > 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/20170817/2e967f97/attachment.html>
More information about the llvm-commits
mailing list