summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r--clang/lib/Basic/FileManager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index 5784f31843f..4431e45962b 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,
OpenPOWER on IntegriCloud