MIRParser: Fix MIRParser not reporting nullptr on error.

While some code paths in MIRParserImpl::parse() already returned nullptr
in case of error one of the important ones did not.

llvm-svn: 275355
This commit is contained in:
Matthias Braun 2016-07-14 00:42:37 +00:00
parent 0418ef2691
commit d6f9562bb4
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ std::unique_ptr<Module> MIRParserImpl::parse() {
Context, &IRSlots);
if (!M) {
reportDiagnostic(diagFromBlockStringDiag(Error, BSN->getSourceRange()));
return M;
return nullptr;
}
In.nextDocument();
if (!In.setCurrentDocument())