summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-08 03:43:51 +0000
committerChris Lattner <sabre@nondot.org>2009-04-08 03:43:51 +0000
commit3875195865acf9304eeebbb792ddbf6751436aba (patch)
treedb1b31c2db16acd216f9a42b82b87bcacbe589fd /llvm/lib/Support/CommandLine.cpp
parent4720840d7ea7e5fe8313d8ef4bf5fba48e14cdbf (diff)
downloadbcm5719-llvm-3875195865acf9304eeebbb792ddbf6751436aba.tar.gz
bcm5719-llvm-3875195865acf9304eeebbb792ddbf6751436aba.zip
Remove AllowInverse: it leaks memory and is not the right
abstraction for CommandLine. llvm-svn: 68588
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 710b210ab99..e4f65ba1de9 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -872,30 +872,9 @@ bool parser<bool>::parse(Option &O, const char *ArgName,
return O.error(": '" + Arg +
"' is invalid value for boolean argument! Try 0 or 1");
}
- if (IsInvertible && strncmp(ArgName+1, "no-", 3) == 0)
- Value = !Value;
return false;
}
-void parser<bool>::getExtraOptionNames(std::vector<const char*> &OptionNames) {
- if (!IsInvertible)
- return;
-
- char *s = new char [strlen(ArgStr) + 3 + 1];
- s[0] = ArgStr[0];
- if (strncmp(ArgStr+1, "no-", 3) == 0)
- strcpy(&s[1], &ArgStr[4]);
- else {
- s[1] = 'n';
- s[2] = 'o';
- s[3] = '-';
- strcpy(&s[4], ArgStr+1);
- }
- OptionNames.push_back(s);
-}
-
-
-
// parser<boolOrDefault> implementation
//
bool parser<boolOrDefault>::parse(Option &O, const char *ArgName,
OpenPOWER on IntegriCloud