Fix refacto, this code was expecting to stride past the argument prefix.

llvm-svn: 82360
This commit is contained in:
Daniel Dunbar 2009-09-20 04:03:41 +00:00
parent 6058b51f8c
commit ecbb126e34
1 changed files with 1 additions and 0 deletions

View File

@ -560,6 +560,7 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
// rest of the name... so fall through to later processing, by // rest of the name... so fall through to later processing, by
// setting up the argument name flags and value fields. // setting up the argument name flags and value fields.
if (PGOpt && PGOpt->getFormattingFlag() == cl::Prefix) { if (PGOpt && PGOpt->getFormattingFlag() == cl::Prefix) {
ArgName = argv[i]+1;
Value = ArgName.substr(Length); Value = ArgName.substr(Length);
assert(Opts.count(ArgName.substr(0, Length)) && assert(Opts.count(ArgName.substr(0, Length)) &&
Opts[ArgName.substr(0, Length)] == PGOpt); Opts[ArgName.substr(0, Length)] == PGOpt);