summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
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
commitc9c67157d18af3aadbea7f4ac81291d281a73ab3 (patch)
treea7830263a2164ae08e9ea595237993ff40b13f24 /llvm/lib/Support/CommandLine.cpp
parent57da7d230895e3263f60d8b2b02d51a9054c4fcb (diff)
downloadbcm5719-llvm-c9c67157d18af3aadbea7f4ac81291d281a73ab3.tar.gz
bcm5719-llvm-c9c67157d18af3aadbea7f4ac81291d281a73ab3.zip
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). llvm-svn: 51771
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 412dcb61839..571b0338677 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/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";
}
}
OpenPOWER on IntegriCloud