diff options
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Basic/FileSystemStatCache.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Basic/VirtualFileSystem.cpp | 2 |
4 files changed, 9 insertions, 9 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, diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index e50dc1b5ed0..dfab9299c09 100644 --- a/clang/lib/Basic/FileSystemStatCache.cpp +++ b/clang/lib/Basic/FileSystemStatCache.cpp @@ -91,7 +91,7 @@ bool FileSystemStatCache::get(const char *Path, FileData &Data, bool isFile, if (Status) { R = CacheExists; copyStatusToFileData(*Status, Data); - *F = OwnedFile.take(); + *F = OwnedFile.release(); } else { // fstat rarely fails. If it does, claim the initial open didn't // succeed. diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 6df7b95b29e..a839b6a9389 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -6015,5 +6015,5 @@ TargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, if (!Target->handleTargetFeatures(Opts->Features, Diags)) return 0; - return Target.take(); + return Target.release(); } diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index 28bb5989341..3775fda4920 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -731,7 +731,7 @@ VFSFromYAML *VFSFromYAML::create(MemoryBuffer *Buffer, if (!P.parse(Root, FS.get())) return NULL; - return FS.take(); + return FS.release(); } ErrorOr<Entry *> VFSFromYAML::lookupPath(const Twine &Path_) { |