diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2019-08-31 19:09:09 +0200 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2019-09-01 16:29:49 +0200 |
commit | b8edb821f252799b5584ed048caec5480de0244e (patch) | |
tree | 311d9196ead5e5e2466d16d7f72886edd7b2c17e | |
parent | c2d74ac67a81734d99b294a182b7de3392b83872 (diff) |
Clang r370122: ArrayRef in CompilerInvocation::CreateFromArgs
Update to use new API.
-rw-r--r-- | iwyu_driver.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/iwyu_driver.cc b/iwyu_driver.cc index eaeba46..bd16314 100644 --- a/iwyu_driver.cc +++ b/iwyu_driver.cc @@ -205,11 +205,8 @@ CompilerInstance* CreateCompilerInstance(int argc, const char **argv) { // Initialize a compiler invocation object from the clang (-cc1) arguments. 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(); std::shared_ptr<CompilerInvocation> invocation(new CompilerInvocation); - CompilerInvocation::CreateFromArgs(*invocation, - args_start, args_end, diagnostics); + CompilerInvocation::CreateFromArgs(*invocation, cc_arguments, diagnostics); invocation->getFrontendOpts().DisableFree = false; // Use libc++ headers bundled with Xcode.app on macOS. |