summaryrefslogtreecommitdiff
path: root/lib/AsmParser/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/Parser.cpp')
-rw-r--r--lib/AsmParser/Parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp
index a1da5e1163..2606bc2d08 100644
--- a/lib/AsmParser/Parser.cpp
+++ b/lib/AsmParser/Parser.cpp
@@ -30,12 +30,12 @@ Module *llvm::ParseAssembly(MemoryBuffer *F,
// If we are parsing into an existing module, do it.
if (M)
- return LLParser(F, SM, Err, M).Run() ? 0 : M;
+ return LLParser(F, SM, Err, M).Run() ? nullptr : M;
// Otherwise create a new module.
std::unique_ptr<Module> M2(new Module(F->getBufferIdentifier(), Context));
if (LLParser(F, SM, Err, M2.get()).Run())
- return 0;
+ return nullptr;
return M2.release();
}
@@ -45,10 +45,10 @@ Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,
if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, File)) {
Err = SMDiagnostic(Filename, SourceMgr::DK_Error,
"Could not open input file: " + ec.message());
- return 0;
+ return nullptr;
}
- return ParseAssembly(File.release(), 0, Err, Context);
+ return ParseAssembly(File.release(), nullptr, Err, Context);
}
Module *llvm::ParseAssemblyString(const char *AsmString, Module *M,