[llvm-strip] Allow only one input

Summary: Before, llvm-strip accepted a second argument but it would just be ignored.

Reviewers: alexshap, jhenderson, paulsemel

Reviewed By: alexshap

Subscribers: jakehehrlich, rupprecht, llvm-commits

Differential Revision: https://reviews.llvm.org/D51004

llvm-svn: 340229
This commit is contained in:
Fangrui Song 2018-08-20 23:01:57 +00:00
parent f02e4f9074
commit ffbc3e2576
1 changed files with 3 additions and 3 deletions

View File

@ -930,12 +930,12 @@ static CopyConfig parseStripOptions(ArrayRef<const char *> ArgsArr) {
T.ParseArgs(ArgsArr, MissingArgumentIndex, MissingArgumentCount);
if (InputArgs.size() == 0) {
T.PrintHelp(errs(), "llvm-strip <input> [ <output> ]", "strip tool");
T.PrintHelp(errs(), "llvm-strip", "strip tool");
exit(1);
}
if (InputArgs.hasArg(STRIP_help)) {
T.PrintHelp(outs(), "llvm-strip <input> [ <output> ]", "strip tool");
T.PrintHelp(outs(), "llvm-strip", "strip tool");
exit(0);
}
@ -948,7 +948,7 @@ static CopyConfig parseStripOptions(ArrayRef<const char *> ArgsArr) {
if (Positional.empty())
error("No input file specified");
if (Positional.size() > 2)
if (Positional.size() > 1)
error("Support for multiple input files is not implemented yet");
CopyConfig Config;