diff options
Diffstat (limited to 'lib/Support/SourceMgr.cpp')
-rw-r--r-- | lib/Support/SourceMgr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index d4b94f8cd5..4bfd96abe5 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -14,7 +14,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/SourceMgr.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/Locale.h" @@ -55,7 +54,7 @@ SourceMgr::~SourceMgr() { size_t SourceMgr::AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc, std::string &IncludedFile) { - OwningPtr<MemoryBuffer> NewBuf; + std::unique_ptr<MemoryBuffer> NewBuf; IncludedFile = Filename; MemoryBuffer::getFile(IncludedFile.c_str(), NewBuf); @@ -67,7 +66,7 @@ size_t SourceMgr::AddIncludeFile(const std::string &Filename, if (!NewBuf) return ~0U; - return AddNewSourceBuffer(NewBuf.take(), IncludeLoc); + return AddNewSourceBuffer(NewBuf.release(), IncludeLoc); } |