diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/Index/SimpleFormatContext.h | |
parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) |
Notes
Diffstat (limited to 'lib/Index/SimpleFormatContext.h')
-rw-r--r-- | lib/Index/SimpleFormatContext.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Index/SimpleFormatContext.h b/lib/Index/SimpleFormatContext.h index fde43aed211f..a460863f803e 100644 --- a/lib/Index/SimpleFormatContext.h +++ b/lib/Index/SimpleFormatContext.h @@ -37,7 +37,7 @@ public: SimpleFormatContext(LangOptions Options) : DiagOpts(new DiagnosticOptions()), Diagnostics(new DiagnosticsEngine(new DiagnosticIDs, - DiagOpts.getPtr())), + DiagOpts.get())), Files((FileSystemOptions())), Sources(*Diagnostics, Files), Rewrite(Sources, Options) { @@ -47,12 +47,11 @@ public: ~SimpleFormatContext() { } FileID createInMemoryFile(StringRef Name, StringRef Content) { - const llvm::MemoryBuffer *Source = - llvm::MemoryBuffer::getMemBuffer(Content); + llvm::MemoryBuffer *Source = llvm::MemoryBuffer::getMemBuffer(Content); const FileEntry *Entry = Files.getVirtualFile(Name, Source->getBufferSize(), 0); - Sources.overrideFileContents(Entry, Source, true); - assert(Entry != NULL); + Sources.overrideFileContents(Entry, Source); + assert(Entry != nullptr); return Sources.createFileID(Entry, SourceLocation(), SrcMgr::C_User); } |