summaryrefslogtreecommitdiff
path: root/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-27 22:13:31 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-27 22:13:31 +0000
commit610ec02d6d37fe332e142d131378545b41db879d (patch)
tree3e1a914c57296954b87e3f8ac641e8068b5d18f3 /lib/Frontend/CreateInvocationFromCommandLine.cpp
parent9e9f8b7c6fc1e2f729253ec29946196fb2f4c2f6 (diff)
downloadclang-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.cpp4
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;