summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-27 20:03:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-27 20:03:29 +0000
commitd87f8d76e0633141712c32bc5266903e0a7715cd (patch)
treee3aa41e1c2a1d760765c68a65171fe51ef02e046 /clang/lib/Index
parent7fa030330c5f36d2515792643214e3ac6f352392 (diff)
downloadbcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.tar.gz
bcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.zip
Update for LLVM api change.
llvm-svn: 216585
Diffstat (limited to 'clang/lib/Index')
-rw-r--r--clang/lib/Index/SimpleFormatContext.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Index/SimpleFormatContext.h b/clang/lib/Index/SimpleFormatContext.h
index 286d97632c2..faf865786a5 100644
--- a/clang/lib/Index/SimpleFormatContext.h
+++ b/clang/lib/Index/SimpleFormatContext.h
@@ -47,10 +47,11 @@ public:
~SimpleFormatContext() { }
FileID createInMemoryFile(StringRef Name, StringRef Content) {
- llvm::MemoryBuffer *Source = llvm::MemoryBuffer::getMemBuffer(Content);
+ std::unique_ptr<llvm::MemoryBuffer> Source =
+ llvm::MemoryBuffer::getMemBuffer(Content);
const FileEntry *Entry =
Files.getVirtualFile(Name, Source->getBufferSize(), 0);
- Sources.overrideFileContents(Entry, Source);
+ Sources.overrideFileContents(Entry, Source.release());
assert(Entry != nullptr);
return Sources.createFileID(Entry, SourceLocation(), SrcMgr::C_User);
}
OpenPOWER on IntegriCloud