Fix -Wcovered-switch-default warnings from r314821

llvm-svn: 314826
This commit is contained in:
Hans Wennborg 2017-10-03 18:44:12 +00:00
parent ab2177edf7
commit dc8d6f2527
2 changed files with 3 additions and 5 deletions

View File

@ -94,12 +94,11 @@ raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_DataKind &Data) {
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;
}

View File

@ -290,9 +290,8 @@ static std::string formatRegisterId(RegisterId Id) {
#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) {