[lld] r239270 - COFF: Simplify. NFC.
Rui Ueyama
ruiu at google.com
Sun Jun 7 16:02:50 PDT 2015
Author: ruiu
Date: Sun Jun 7 18:02:50 2015
New Revision: 239270
URL: http://llvm.org/viewvc/llvm-project?rev=239270&view=rev
Log:
COFF: Simplify. NFC.
Modified:
lld/trunk/COFF/DriverUtils.cpp
Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=239270&r1=239269&r2=239270&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Sun Jun 7 18:02:50 2015
@@ -193,8 +193,7 @@ ArgParser::parse(std::vector<const char
ErrorOr<std::unique_ptr<llvm::opt::InputArgList>>
ArgParser::parse(int Argc, const char *Argv[]) {
- std::vector<const char *> V;
- V.insert(V.end(), Argv + 1, Argv + Argc);
+ std::vector<const char *> V(Argv + 1, Argv + Argc);
return parse(V);
}
@@ -213,9 +212,7 @@ std::vector<const char *> ArgParser::tok
SmallVector<const char *, 16> Tokens;
BumpPtrStringSaver Saver(&Alloc);
llvm::cl::TokenizeWindowsCommandLine(S, Saver, Tokens);
- std::vector<const char *> V;
- V.insert(V.end(), &Tokens[0], &Tokens[0] + Tokens.size());
- return V;
+ return std::vector<const char *>(Tokens.begin(), Tokens.end());
}
// Creates a new command line by replacing options starting with '@'
More information about the llvm-commits
mailing list