diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /lib/Index/SimpleFormatContext.h | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'lib/Index/SimpleFormatContext.h')
-rw-r--r-- | lib/Index/SimpleFormatContext.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Index/SimpleFormatContext.h b/lib/Index/SimpleFormatContext.h index a460863..080a4ad 100644 --- a/lib/Index/SimpleFormatContext.h +++ b/lib/Index/SimpleFormatContext.h @@ -13,8 +13,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SIMPLE_FORM_CONTEXT_H -#define LLVM_CLANG_SIMPLE_FORM_CONTEXT_H +#ifndef LLVM_CLANG_LIB_INDEX_SIMPLEFORMATCONTEXT_H +#define LLVM_CLANG_LIB_INDEX_SIMPLEFORMATCONTEXT_H #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticOptions.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, std::move(Source)); assert(Entry != nullptr); return Sources.createFileID(Entry, SourceLocation(), SrcMgr::C_User); } |