[llvm-commits] [llvm] r51771 - /llvm/trunk/lib/Support/CommandLine.cpp

Matthijs Kooijman matthijs at stdin.nl
Fri May 30 06:26:12 PDT 2008


Author: matthijs
Date: Fri May 30 08:26:11 2008
New Revision: 51771

URL: http://llvm.org/viewvc/llvm-project?rev=51771&view=rev
Log:
Give a proper error message when a command line option is defined more than
once (ie, at two different places in the source, not two times on the
commandline).

Modified:
    llvm/trunk/lib/Support/CommandLine.cpp

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=51771&r1=51770&r2=51771&view=diff

==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Fri May 30 08:26:11 2008
@@ -120,7 +120,7 @@
       if (!OptionsMap.insert(std::pair<std::string,Option*>(OptionNames[i],
                                                             O)).second) {
         cerr << ProgramName << ": CommandLine Error: Argument '"
-             << OptionNames[0] << "' defined more than once!\n";
+             << OptionNames[i] << "' defined more than once!\n";
       }
     }
 





More information about the llvm-commits mailing list