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/Lex/PTHLexer.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 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index c962409dbd..c79aa185d8 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -425,7 +425,7 @@ static void InvalidPTH(DiagnosticsEngine &Diags, const char *Msg) { PTHManager *PTHManager::Create(const std::string &file, DiagnosticsEngine &Diags) { // Memory map the PTH file. - OwningPtr<llvm::MemoryBuffer> File; + std::unique_ptr<llvm::MemoryBuffer> File; if (llvm::MemoryBuffer::getFile(file, File)) { // FIXME: Add ec.message() to this diag. @@ -475,7 +475,7 @@ PTHManager *PTHManager::Create(const std::string &file, return 0; // FIXME: Proper error diagnostic? } - OwningPtr<PTHFileLookup> FL(PTHFileLookup::Create(FileTable, BufBeg)); + std::unique_ptr<PTHFileLookup> FL(PTHFileLookup::Create(FileTable, BufBeg)); // Warn if the PTH file is empty. We still want to create a PTHManager // as the PTH could be used with -include-pth. @@ -501,8 +501,8 @@ PTHManager *PTHManager::Create(const std::string &file, return 0; } - OwningPtr<PTHStringIdLookup> SL(PTHStringIdLookup::Create(StringIdTable, - BufBeg)); + std::unique_ptr<PTHStringIdLookup> SL( + PTHStringIdLookup::Create(StringIdTable, BufBeg)); // Get the location of the spelling cache. const unsigned char* spellingBaseOffset = PrologueOffset + sizeof(uint32_t)*3; |