summaryrefslogtreecommitdiff
path: root/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
commit490fd36bd1c7ea10aa7f19d000cf27f58db99d1e (patch)
treeb9a86bd3144817a464cd9f2a7a8ecdb539c0e00c /lib/Basic/SourceManager.cpp
parent8188b32923c735fc60dc89649b5885fbb363e71b (diff)
downloadclang-490fd36bd1c7ea10aa7f19d000cf27f58db99d1e.tar.gz
Return a std::unique_ptr from getBufferForFile. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 14de7607c3..ef52e824b1 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/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