summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Grasman <kim.grasman@gmail.com>2017-01-06 10:53:14 +0100
committerKim Gräsman <kim.grasman@gmail.com>2017-01-06 10:56:09 +0100
commitda5c9b17fec571e6b2bbca29145463d7eaa3582e (patch)
treea93f34eddd92be587d7f320f7b5f50270b0b7ed4
parent52cc0bf1a5976a497b41e72c152325831bc56f01 (diff)
Update to reflect changes in Clang
r291184 switched the CompilerInvocation argument to a shared_ptr.
-rw-r--r--iwyu_driver.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/iwyu_driver.cc b/iwyu_driver.cc
index 574f5b2..7eea196 100644
--- a/iwyu_driver.cc
+++ b/iwyu_driver.cc
@@ -207,7 +207,7 @@ CompilerInstance* CreateCompilerInstance(int argc, const char **argv) {
const ArgStringList &cc_arguments = command.getArguments();
const char** args_start = const_cast<const char**>(cc_arguments.data());
const char** args_end = args_start + cc_arguments.size();
- unique_ptr<CompilerInvocation> invocation(new CompilerInvocation);
+ std::shared_ptr<CompilerInvocation> invocation(new CompilerInvocation);
CompilerInvocation::CreateFromArgs(*invocation,
args_start, args_end, diagnostics);
invocation->getFrontendOpts().DisableFree = false;
@@ -238,7 +238,7 @@ CompilerInstance* CreateCompilerInstance(int argc, const char **argv) {
// Create a compiler instance to handle the actual work.
// The caller will be responsible for freeing this.
CompilerInstance* compiler = new CompilerInstance;
- compiler->setInvocation(invocation.release());
+ compiler->setInvocation(invocation);
// Create the compilers actual diagnostics engine.
compiler->createDiagnostics();