Update for LLVM api change.
llvm-svn: 216585
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp
index 0db38db..cf8536e 100644
--- a/clang/lib/Tooling/Tooling.cpp
+++ b/clang/lib/Tooling/Tooling.cpp
@@ -223,8 +223,10 @@
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());
}