ArrayRef'ized CompilerInvocation::CreateFromArgs
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66797
llvm-svn: 370122
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 0e222b9..86c66f3 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3370,8 +3370,7 @@
}
bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
- const char *const *ArgBegin,
- const char *const *ArgEnd,
+ ArrayRef<const char *> CommandLineArgs,
DiagnosticsEngine &Diags) {
bool Success = true;
@@ -3379,9 +3378,8 @@
std::unique_ptr<OptTable> Opts = createDriverOptTable();
const unsigned IncludedFlagsBitmask = options::CC1Option;
unsigned MissingArgIndex, MissingArgCount;
- InputArgList Args =
- Opts->ParseArgs(llvm::makeArrayRef(ArgBegin, ArgEnd), MissingArgIndex,
- MissingArgCount, IncludedFlagsBitmask);
+ InputArgList Args = Opts->ParseArgs(CommandLineArgs, MissingArgIndex,
+ MissingArgCount, IncludedFlagsBitmask);
LangOptions &LangOpts = *Res.getLangOpts();
// Check for missing argument error.