Fix MSVC "not all control paths return a value" warnings. NFCI.

llvm-svn: 365119
This commit is contained in:
Simon Pilgrim 2019-07-04 09:46:06 +00:00
parent 67dd39f86e
commit 8177673fb4
1 changed files with 2 additions and 4 deletions

View File

@ -25,9 +25,8 @@ static std::unique_ptr<ParserImpl> formatToParserImpl(ParserFormat Format,
switch (Format) {
case ParserFormat::YAML:
return llvm::make_unique<YAMLParserImpl>(Buf);
default:
llvm_unreachable("Unknown format encountered!");
};
llvm_unreachable("Unhandled llvm::remarks::ParserFormat enum");
}
static std::unique_ptr<ParserImpl>
@ -36,9 +35,8 @@ formatToParserImpl(ParserFormat Format, StringRef Buf,
switch (Format) {
case ParserFormat::YAML:
return llvm::make_unique<YAMLParserImpl>(Buf, &StrTab);
default:
llvm_unreachable("Unknown format encountered!");
};
llvm_unreachable("Unhandled llvm::remarks::ParserFormat enum");
}
Parser::Parser(ParserFormat Format, StringRef Buf)