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 | b89843299a118d9f97774f35e59f9b541ef5e284 (patch) | |
| tree | ee6366d2f652d2475d52f6ea9b4fbbc64dc2647e /clang/lib/Lex | |
| parent | 629afaefe0cd1a583ccee54918b7b13f48bfe273 (diff) | |
| download | bcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.tar.gz bcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.zip | |
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/HeaderMap.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Lex/HeaderMap.cpp b/clang/lib/Lex/HeaderMap.cpp index 56fd6946b03..d71e4bc278e 100644 --- a/clang/lib/Lex/HeaderMap.cpp +++ b/clang/lib/Lex/HeaderMap.cpp @@ -81,7 +81,7 @@ const HeaderMap *HeaderMap::Create(const FileEntry *FE, FileManager &FM) { unsigned FileSize = FE->getSize(); if (FileSize <= sizeof(HMapHeader)) return 0; - OwningPtr<const llvm::MemoryBuffer> FileBuffer(FM.getBufferForFile(FE)); + std::unique_ptr<const llvm::MemoryBuffer> FileBuffer(FM.getBufferForFile(FE)); if (!FileBuffer) return 0; // Unreadable file? const char *FileStart = FileBuffer->getBufferStart(); diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index c962409dbd7..c79aa185d86 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/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; |

