forked from OSchip/llvm-project
[ExpressionParser] Reserve size before copying over args
We already know the final size here so we might as well reserve it so we don't have to re-allocate during the loop. llvm-svn: 349967
This commit is contained in:
parent
fe36417f6e
commit
aa2dc6bfec
|
@ -608,7 +608,8 @@ ClangModulesDeclVendor::Create(Target &target) {
|
|||
new StoringDiagnosticConsumer);
|
||||
|
||||
std::vector<const char *> compiler_invocation_argument_cstrs;
|
||||
|
||||
compiler_invocation_argument_cstrs.reserve(
|
||||
compiler_invocation_arguments.size());
|
||||
for (const std::string &arg : compiler_invocation_arguments) {
|
||||
compiler_invocation_argument_cstrs.push_back(arg.c_str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue