summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-05 12:12:43 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-05 12:12:43 +0000
commit544615f893a6318b533d6bdf9c609db7169328ff (patch)
treee2a4a96678d80b67512aa855fe4e36ad91b414c7 /llvm/tools/llvm-ar/llvm-ar.cpp
parentd769cec6e3e03607db5939e34164920087944383 (diff)
downloadbcm5719-llvm-544615f893a6318b533d6bdf9c609db7169328ff.tar.gz
bcm5719-llvm-544615f893a6318b533d6bdf9c609db7169328ff.zip
Remove NoOperation.
parseCommandLine prints and error and exists if no operation is specified, so it never returns NoOperation. llvm-svn: 185691
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 80bc21ae5cb..50de10bcfe5 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud