From d6f9562bb4bd854704e0baee01ef0595e78fb9f5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 14 Jul 2016 00:42:37 +0000 Subject: [PATCH] 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 --- llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index 2d97960dc444..4aa3df6326e9 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -231,7 +231,7 @@ std::unique_ptr MIRParserImpl::parse() { Context, &IRSlots); if (!M) { reportDiagnostic(diagFromBlockStringDiag(Error, BSN->getSourceRange())); - return M; + return nullptr; } In.nextDocument(); if (!In.setCurrentDocument())