diff options
| author | Craig Topper <craig.topper@gmail.com> | 2014-05-22 05:54:18 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2014-05-22 05:54:18 +0000 |
| commit | 5017bb66166679620f1e22de2f507888473e1c89 (patch) | |
| tree | fcbc6fc3171f8d0b70f34aebf952209af51b1638 /lib/Serialization/GlobalModuleIndex.cpp | |
| parent | d24fb6c9472187a9e77ea371fd73d92a4f6c69f0 (diff) | |
| download | clang-5017bb66166679620f1e22de2f507888473e1c89.tar.gz clang-5017bb66166679620f1e22de2f507888473e1c89.tar.bz2 clang-5017bb66166679620f1e22de2f507888473e1c89.tar.xz | |
[C++11] Use 'nullptr'. Serialization edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
| -rw-r--r-- | lib/Serialization/GlobalModuleIndex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index 04e4fb2c02..69c331b3ce 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -242,7 +242,7 @@ GlobalModuleIndex::readIndex(StringRef Path) { std::unique_ptr<llvm::MemoryBuffer> Buffer; if (llvm::MemoryBuffer::getFile(IndexPath.c_str(), Buffer) != llvm::errc::success) - return std::make_pair((GlobalModuleIndex *)0, EC_NotFound); + return std::make_pair(nullptr, EC_NotFound); /// \brief The bitstream reader from which we'll read the AST file. llvm::BitstreamReader Reader((const unsigned char *)Buffer->getBufferStart(), @@ -256,7 +256,7 @@ GlobalModuleIndex::readIndex(StringRef Path) { Cursor.Read(8) != 'C' || Cursor.Read(8) != 'G' || Cursor.Read(8) != 'I') { - return std::make_pair((GlobalModuleIndex *)0, EC_IOError); + return std::make_pair(nullptr, EC_IOError); } return std::make_pair(new GlobalModuleIndex(Buffer.release(), Cursor), @@ -436,7 +436,7 @@ static void emitBlockID(unsigned ID, const char *Name, Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record); // Emit the block name if present. - if (Name == 0 || Name[0] == 0) return; + if (!Name || Name[0] == 0) return; Record.clear(); while (*Name) Record.push_back(*Name++); |
