diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-27 20:03:29 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-27 20:03:29 +0000 |
commit | d87f8d76e0633141712c32bc5266903e0a7715cd (patch) | |
tree | e3aa41e1c2a1d760765c68a65171fe51ef02e046 /clang/lib/Tooling/Tooling.cpp | |
parent | 7fa030330c5f36d2515792643214e3ac6f352392 (diff) | |
download | bcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.tar.gz bcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.zip |
Update for LLVM api change.
llvm-svn: 216585
Diffstat (limited to 'clang/lib/Tooling/Tooling.cpp')
-rw-r--r-- | clang/lib/Tooling/Tooling.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp index 0db38db3c91..cf8536e234f 100644 --- a/clang/lib/Tooling/Tooling.cpp +++ b/clang/lib/Tooling/Tooling.cpp @@ -223,8 +223,10 @@ bool ToolInvocation::run() { newInvocation(&Diagnostics, *CC1Args)); for (const auto &It : MappedFileContents) { // Inject the code as the given file name into the preprocessor options. - auto *Input = llvm::MemoryBuffer::getMemBuffer(It.getValue()); - Invocation->getPreprocessorOpts().addRemappedFile(It.getKey(), Input); + std::unique_ptr<llvm::MemoryBuffer> Input = + llvm::MemoryBuffer::getMemBuffer(It.getValue()); + Invocation->getPreprocessorOpts().addRemappedFile(It.getKey(), + Input.release()); } return runInvocation(BinaryName, Compilation.get(), Invocation.release()); } |