Add StringList support

llvm-svn: 766
This commit is contained in:
Chris Lattner 2001-10-13 06:53:19 +00:00
parent f0b68888af
commit 675db8db26
2 changed files with 20 additions and 2 deletions

View File

@ -185,7 +185,8 @@ bool Flag::handleOccurance(const char *ArgName, const string &Arg) {
} else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
Value = false;
} else {
return error(": '" + Arg + "' is invalid value for boolean argument! Try 0 or 1");
return error(": '" + Arg +
"' is invalid value for boolean argument! Try 0 or 1");
}
return false;
@ -211,6 +212,14 @@ bool String::handleOccurance(const char *ArgName, const string &Arg) {
return false;
}
//===----------------------------------------------------------------------===//
// StringList valued command line option implementation
//
bool StringList::handleOccurance(const char *ArgName, const string &Arg) {
Values.push_back(Arg);
return false;
}
//===----------------------------------------------------------------------===//
// Enum valued command line option implementation
//

View File

@ -185,7 +185,8 @@ bool Flag::handleOccurance(const char *ArgName, const string &Arg) {
} else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
Value = false;
} else {
return error(": '" + Arg + "' is invalid value for boolean argument! Try 0 or 1");
return error(": '" + Arg +
"' is invalid value for boolean argument! Try 0 or 1");
}
return false;
@ -211,6 +212,14 @@ bool String::handleOccurance(const char *ArgName, const string &Arg) {
return false;
}
//===----------------------------------------------------------------------===//
// StringList valued command line option implementation
//
bool StringList::handleOccurance(const char *ArgName, const string &Arg) {
Values.push_back(Arg);
return false;
}
//===----------------------------------------------------------------------===//
// Enum valued command line option implementation
//