[llvm] r311129 - Fix warning about covered switch default.
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 15:33:12 PDT 2017
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
More information about the llvm-commits
mailing list