From 9a16beb8bc580212df519aa488242a94e53741d8 Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Fri, 7 Mar 2014 19:33:25 +0000 Subject: Change OwningPtr::take() to OwningPtr::release(). This is a precursor to moving to std::unique_ptr. llvm-svn: 203275 --- clang/lib/Basic/FileManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/lib/Basic/FileManager.cpp') diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 5784f31..4431e45 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -71,7 +71,7 @@ void FileManager::addStatCache(FileSystemStatCache *statCache, bool AtBeginning) { assert(statCache && "No stat cache provided?"); if (AtBeginning || StatCache.get() == 0) { - statCache->setNextStatCache(StatCache.take()); + statCache->setNextStatCache(StatCache.release()); StatCache.reset(statCache); return; } @@ -395,7 +395,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, if (ErrorStr) *ErrorStr = ec.message(); Entry->closeFile(); - return Result.take(); + return Result.release(); } // Otherwise, open the file. @@ -404,7 +404,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, ec = FS->getBufferForFile(Filename, Result, FileSize); if (ec && ErrorStr) *ErrorStr = ec.message(); - return Result.take(); + return Result.release(); } SmallString<128> FilePath(Entry->getName()); @@ -412,7 +412,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr, ec = FS->getBufferForFile(FilePath.str(), Result, FileSize); if (ec && ErrorStr) *ErrorStr = ec.message(); - return Result.take(); + return Result.release(); } llvm::MemoryBuffer *FileManager:: @@ -423,7 +423,7 @@ getBufferForFile(StringRef Filename, std::string *ErrorStr) { ec = FS->getBufferForFile(Filename, Result); if (ec && ErrorStr) *ErrorStr = ec.message(); - return Result.take(); + return Result.release(); } SmallString<128> FilePath(Filename); @@ -431,7 +431,7 @@ getBufferForFile(StringRef Filename, std::string *ErrorStr) { ec = FS->getBufferForFile(FilePath.c_str(), Result); if (ec && ErrorStr) *ErrorStr = ec.message(); - return Result.take(); + return Result.release(); } /// getStatValue - Get the 'stat' information for the specified path, -- cgit v1.1