diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 12:12:43 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 12:12:43 +0000 |
commit | 87b8a7f9996ee7463b787fc85394287de903c7d7 (patch) | |
tree | 96833feb873ef9c80bf379efaa636012c2647ba5 | |
parent | b6566aee3037f2d6e6837a93e0f766972179ed74 (diff) | |
download | external_llvm-87b8a7f9996ee7463b787fc85394287de903c7d7.zip external_llvm-87b8a7f9996ee7463b787fc85394287de903c7d7.tar.gz external_llvm-87b8a7f9996ee7463b787fc85394287de903c7d7.tar.bz2 |
Remove NoOperation.
parseCommandLine prints and error and exists if no operation is specified, so
it never returns NoOperation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185691 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/llvm-ar/llvm-ar.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 80bc21a..50de10b 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -83,7 +83,6 @@ static cl::extrahelp MoreHelp( // This enumeration delineates the kinds of operations on an archive // that are permitted. enum ArchiveOperation { - NoOperation, ///< An operation hasn't been specified Print, ///< Print the contents of the archive Delete, ///< Delete the specified members Move, ///< Move members to end or as given by {a,b,i} modifiers @@ -205,7 +204,7 @@ ArchiveOperation parseCommandLine() { unsigned NumPositional = 0; // Keep track of which operation was requested - ArchiveOperation Operation = NoOperation; + ArchiveOperation Operation; for(unsigned i=0; i<Options.size(); ++i) { switch(Options[i]) { @@ -697,9 +696,6 @@ int main(int argc, char **argv) { case ReplaceOrInsert: haveError = doReplaceOrInsert(&ErrMsg); break; case DisplayTable: haveError = doDisplayTable(&ErrMsg); break; case Extract: haveError = doExtract(&ErrMsg); break; - case NoOperation: - errs() << argv[0] << ": No operation was selected.\n"; - break; } if (haveError) { errs() << argv[0] << ": " << ErrMsg << "\n"; |