diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-26 19:54:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-26 19:54:40 +0000 |
commit | 490fd36bd1c7ea10aa7f19d000cf27f58db99d1e (patch) | |
tree | b9a86bd3144817a464cd9f2a7a8ecdb539c0e00c /lib/Basic/SourceManager.cpp | |
parent | 8188b32923c735fc60dc89649b5885fbb363e71b (diff) | |
download | clang-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.cpp | 6 |
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 |