summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-07-14 00:42:37 +0000
committerMatthias Braun <matze@braunis.de>2016-07-14 00:42:37 +0000
commitd6f9562bb4bd854704e0baee01ef0595e78fb9f5 (patch)
treef087c2df3938e294db03a75b822feace15a00c02
parent0418ef2691110903254f98214a869ddd682a31e7 (diff)
downloadbcm5719-llvm-d6f9562bb4bd854704e0baee01ef0595e78fb9f5.tar.gz
bcm5719-llvm-d6f9562bb4bd854704e0baee01ef0595e78fb9f5.zip
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
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index 2d97960dc44..4aa3df6326e 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -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())
OpenPOWER on IntegriCloud