diff options
| author | Craig Topper <craig.topper@gmail.com> | 2014-05-21 05:09:00 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2014-05-21 05:09:00 +0000 |
| commit | d1008e5c93536222903523b70245ec66876bbad5 (patch) | |
| tree | 497a27f59709ab02c2dedda0150112ece7b52023 /lib/CodeGen/CodeGenAction.cpp | |
| parent | 7a1672c5c23b8a5707282062b916ca6c447da7a1 (diff) | |
| download | clang-d1008e5c93536222903523b70245ec66876bbad5.tar.gz clang-d1008e5c93536222903523b70245ec66876bbad5.tar.bz2 clang-d1008e5c93536222903523b70245ec66876bbad5.tar.xz | |
[C++11] Use 'nullptr'. CodeGen edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenAction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenAction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 9b5b9f59ab..2d08c22c51 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -466,7 +466,7 @@ void BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &DI) { #undef ComputeDiagID CodeGenAction::CodeGenAction(unsigned _Act, LLVMContext *_VMContext) - : Act(_Act), LinkModule(0), + : Act(_Act), LinkModule(nullptr), VMContext(_VMContext ? _VMContext : new LLVMContext), OwnsVMContext(!_VMContext) {} @@ -509,7 +509,7 @@ static raw_ostream *GetOutputStream(CompilerInstance &CI, case Backend_EmitBC: return CI.createDefaultOutputFile(true, InFile, "bc"); case Backend_EmitNothing: - return 0; + return nullptr; case Backend_EmitMCNull: case Backend_EmitObj: return CI.createDefaultOutputFile(true, InFile, "o"); @@ -523,7 +523,7 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, BackendAction BA = static_cast<BackendAction>(Act); std::unique_ptr<raw_ostream> OS(GetOutputStream(CI, InFile, BA)); if (BA != Backend_EmitNothing && !OS) - return 0; + return nullptr; llvm::Module *LinkModuleToUse = LinkModule; @@ -538,7 +538,7 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, if (!BCBuf) { CI.getDiagnostics().Report(diag::err_cannot_open_file) << LinkBCFile << ErrorStr; - return 0; + return nullptr; } ErrorOr<llvm::Module *> ModuleOrErr = @@ -546,7 +546,7 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, if (error_code EC = ModuleOrErr.getError()) { CI.getDiagnostics().Report(diag::err_cannot_open_file) << LinkBCFile << EC.message(); - return 0; + return nullptr; } LinkModuleToUse = ModuleOrErr.get(); } |
