From ffbc3e2576b36f950e544136a1d1ccd93fd259c1 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 20 Aug 2018 23:01:57 +0000 Subject: [PATCH] [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 --- llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp index 699dca6a94cd..b2a6ed44c00d 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp @@ -930,12 +930,12 @@ static CopyConfig parseStripOptions(ArrayRef ArgsArr) { T.ParseArgs(ArgsArr, MissingArgumentIndex, MissingArgumentCount); if (InputArgs.size() == 0) { - T.PrintHelp(errs(), "llvm-strip [ ]", "strip tool"); + T.PrintHelp(errs(), "llvm-strip", "strip tool"); exit(1); } if (InputArgs.hasArg(STRIP_help)) { - T.PrintHelp(outs(), "llvm-strip [ ]", "strip tool"); + T.PrintHelp(outs(), "llvm-strip", "strip tool"); exit(0); } @@ -948,7 +948,7 @@ static CopyConfig parseStripOptions(ArrayRef 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;