[llvm] r314826 - Fix -Wcovered-switch-default warnings from r314821
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 11:44:12 PDT 2017
Author: hans
Date: Tue Oct 3 11:44:12 2017
New Revision: 314826
URL: http://llvm.org/viewvc/llvm-project?rev=314826&view=rev
Log:
Fix -Wcovered-switch-default warnings from r314821
Modified:
llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp?rev=314826&r1=314825&r2=314826&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp Tue Oct 3 11:44:12 2017
@@ -94,12 +94,11 @@ raw_ostream &llvm::pdb::operator<<(raw_o
raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
const codeview::RegisterId &Reg) {
switch (Reg) {
-#define CV_REGISTER(name, val) case codeview::RegisterId::name: OS << #name; break;
+#define CV_REGISTER(name, val) case codeview::RegisterId::name: OS << #name; return OS;
#include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"
#undef CV_REGISTER
- default:
- OS << static_cast<int>(Reg);
}
+ OS << static_cast<int>(Reg);
return OS;
}
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=314826&r1=314825&r2=314826&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Tue Oct 3 11:44:12 2017
@@ -290,9 +290,8 @@ static std::string formatRegisterId(Regi
#define CV_REGISTER(name, val) RETURN_CASE(RegisterId, name, #name)
#include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"
#undef CV_REGISTER
- default:
- return formatUnknownEnum(Id);
}
+ return formatUnknownEnum(Id);
}
static std::string formatRange(LocalVariableAddrRange Range) {
More information about the llvm-commits
mailing list