diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2019-08-27 22:13:31 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2019-08-27 22:13:31 +0000 |
commit | 610ec02d6d37fe332e142d131378545b41db879d (patch) | |
tree | 3e1a914c57296954b87e3f8ac641e8068b5d18f3 /lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 9e9f8b7c6fc1e2f729253ec29946196fb2f4c2f6 (diff) | |
download | clang-610ec02d6d37fe332e142d131378545b41db879d.tar.gz |
ArrayRef'ized CompilerInvocation::CreateFromArgs
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66797
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp')
-rw-r--r-- | lib/Frontend/CreateInvocationFromCommandLine.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index ea7de7a411..ab62b633cd 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -90,9 +90,7 @@ std::unique_ptr<CompilerInvocation> clang::createInvocationFromCommandLine( const ArgStringList &CCArgs = Cmd.getArguments(); auto CI = std::make_unique<CompilerInvocation>(); - if (!CompilerInvocation::CreateFromArgs( - *CI, const_cast<const char **>(CCArgs.data()), - const_cast<const char **>(CCArgs.data()) + CCArgs.size(), *Diags) && + if (!CompilerInvocation::CreateFromArgs(*CI, CCArgs, *Diags) && !ShouldRecoverOnErorrs) return nullptr; return CI; |