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 /tools/libclang/CXLoadedDiagnostic.cpp | |
parent | caabaa8e4b0d6d4534152852a3dfc69cfd386050 (diff) |
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 'tools/libclang/CXLoadedDiagnostic.cpp')
-rw-r--r-- | tools/libclang/CXLoadedDiagnostic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/libclang/CXLoadedDiagnostic.cpp b/tools/libclang/CXLoadedDiagnostic.cpp index 2871256b0c..679c528526 100644 --- a/tools/libclang/CXLoadedDiagnostic.cpp +++ b/tools/libclang/CXLoadedDiagnostic.cpp @@ -259,7 +259,7 @@ CXDiagnosticSet DiagLoader::load(const char *file) { FileSystemOptions FO; FileManager FileMgr(FO); - OwningPtr<llvm::MemoryBuffer> Buffer; + std::unique_ptr<llvm::MemoryBuffer> Buffer; Buffer.reset(FileMgr.getBufferForFile(file)); if (!Buffer) { @@ -284,7 +284,8 @@ CXDiagnosticSet DiagLoader::load(const char *file) { return 0; } - OwningPtr<CXLoadedDiagnosticSetImpl> Diags(new CXLoadedDiagnosticSetImpl()); + std::unique_ptr<CXLoadedDiagnosticSetImpl> Diags( + new CXLoadedDiagnosticSetImpl()); while (true) { unsigned BlockID = 0; @@ -539,8 +540,8 @@ LoadResult DiagLoader::readDiagnosticBlock(llvm::BitstreamCursor &Stream, reportInvalidFile("malformed diagnostic block"); return Failure; } - - OwningPtr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic()); + + std::unique_ptr<CXLoadedDiagnostic> D(new CXLoadedDiagnostic()); RecordData Record; while (true) { |