aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-26 19:54:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-26 19:54:40 +0000
commit6406f7b8e0fc43c5f9d14bb3cd1d7d9192e3d277 (patch)
treee1d44a3a5a3732181039d9607893c24807a2fc65 /clang/lib/Basic/SourceManager.cpp
parentcb5674b9c2e4d7944bd8fe0ed92f316e8e5d5f30 (diff)
downloadllvm-6406f7b8e0fc43c5f9d14bb3cd1d7d9192e3d277.zip
llvm-6406f7b8e0fc43c5f9d14bb3cd1d7d9192e3d277.tar.gz
llvm-6406f7b8e0fc43c5f9d14bb3cd1d7d9192e3d277.tar.bz2
Return a std::unique_ptr from getBufferForFile. NFC.
llvm-svn: 216476
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 14de760..ef52e82 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -96,9 +96,9 @@ llvm::MemoryBuffer *ContentCache::getBuffer(DiagnosticsEngine &Diag,
std::string ErrorStr;
bool isVolatile = SM.userFilesAreVolatile() && !IsSystemFile;
- Buffer.setPointer(SM.getFileManager().getBufferForFile(ContentsEntry,
- &ErrorStr,
- isVolatile));
+ Buffer.setPointer(SM.getFileManager()
+ .getBufferForFile(ContentsEntry, &ErrorStr, isVolatile)
+ .release());
// If we were unable to open the file, then we are in an inconsistent
// situation where the content cache referenced a file which no longer