diff options
| author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-07 20:03:18 +0000 |
|---|---|---|
| committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-07 20:03:18 +0000 |
| commit | 70639e8de3f7232504008ae36507eb0125093907 (patch) | |
| tree | f909e5aea2fab1df90f2ecae3695c0acfeb45e8c /lib/Serialization/GlobalModuleIndex.cpp | |
| parent | caabaa8e4b0d6d4534152852a3dfc69cfd386050 (diff) | |
| download | clang-70639e8de3f7232504008ae36507eb0125093907.tar.gz clang-70639e8de3f7232504008ae36507eb0125093907.tar.bz2 clang-70639e8de3f7232504008ae36507eb0125093907.tar.xz | |
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
| -rw-r--r-- | lib/Serialization/GlobalModuleIndex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index e46cb97b9f..5cd3ad5575 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -228,7 +228,7 @@ GlobalModuleIndex::readIndex(StringRef Path) { IndexPath += Path; llvm::sys::path::append(IndexPath, IndexFileName); - llvm::OwningPtr<llvm::MemoryBuffer> Buffer; + 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); @@ -469,7 +469,7 @@ namespace { bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { // Open the module file. - OwningPtr<llvm::MemoryBuffer> Buffer; + std::unique_ptr<llvm::MemoryBuffer> Buffer; std::string ErrorStr; Buffer.reset(FileMgr.getBufferForFile(File, &ErrorStr, /*isVolatile=*/true)); if (!Buffer) { @@ -593,10 +593,10 @@ bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { if (State == ASTBlock && Code == IDENTIFIER_TABLE && Record[0] > 0) { typedef OnDiskChainedHashTable<InterestingASTIdentifierLookupTrait> InterestingIdentifierTable; - llvm::OwningPtr<InterestingIdentifierTable> - Table(InterestingIdentifierTable::Create( - (const unsigned char *)Blob.data() + Record[0], - (const unsigned char *)Blob.data())); + std::unique_ptr<InterestingIdentifierTable> Table( + InterestingIdentifierTable::Create( + (const unsigned char *)Blob.data() + Record[0], + (const unsigned char *)Blob.data())); for (InterestingIdentifierTable::data_iterator D = Table->data_begin(), DEnd = Table->data_end(); D != DEnd; ++D) { |
