diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /lib/Option/Arg.cpp | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'lib/Option/Arg.cpp')
-rw-r--r-- | lib/Option/Arg.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Option/Arg.cpp b/lib/Option/Arg.cpp index 4c8da58..af632d6 100644 --- a/lib/Option/Arg.cpp +++ b/lib/Option/Arg.cpp @@ -83,15 +83,13 @@ void Arg::renderAsInput(const ArgList &Args, ArgStringList &Output) const { return; } - for (unsigned i = 0, e = getNumValues(); i != e; ++i) - Output.push_back(getValue(i)); + Output.append(Values.begin(), Values.end()); } void Arg::render(const ArgList &Args, ArgStringList &Output) const { switch (getOption().getRenderStyle()) { case Option::RenderValuesStyle: - for (unsigned i = 0, e = getNumValues(); i != e; ++i) - Output.push_back(getValue(i)); + Output.append(Values.begin(), Values.end()); break; case Option::RenderCommaJoinedStyle: { @@ -109,14 +107,12 @@ void Arg::render(const ArgList &Args, ArgStringList &Output) const { case Option::RenderJoinedStyle: Output.push_back(Args.GetOrMakeJoinedArgString( getIndex(), getSpelling(), getValue(0))); - for (unsigned i = 1, e = getNumValues(); i != e; ++i) - Output.push_back(getValue(i)); + Output.append(Values.begin() + 1, Values.end()); break; case Option::RenderSeparateStyle: Output.push_back(Args.MakeArgString(getSpelling())); - for (unsigned i = 0, e = getNumValues(); i != e; ++i) - Output.push_back(getValue(i)); + Output.append(Values.begin(), Values.end()); break; } } |