summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2008-05-30 13:26:11 +0000
committerMatthijs Kooijman <matthijs@stdin.nl>2008-05-30 13:26:11 +0000
commit33540adca55b95a5fdbb0dc783ded319a90b4bc1 (patch)
tree87d1c8946c9dd5cb023e4079e1c18ff7598be0aa /lib/Support
parent494661c623e06122eb63fe3a78aef131cdad10d2 (diff)
downloadllvm-33540adca55b95a5fdbb0dc783ded319a90b4bc1.tar.gz
llvm-33540adca55b95a5fdbb0dc783ded319a90b4bc1.tar.bz2
llvm-33540adca55b95a5fdbb0dc783ded319a90b4bc1.tar.xz
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 412dcb6183..571b033867 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -120,7 +120,7 @@ static void GetOptionInfo(std::vector<Option*> &PositionalOpts,
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";
}
}