From 00a7b52385a25ab8cd412ce4c0f0ce11176b6793 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 8 Apr 2009 03:43:51 +0000 Subject: Remove AllowInverse: it leaks memory and is not the right abstraction for CommandLine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68588 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/CommandLine.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/Support/CommandLine.cpp') diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 710b210ab9..e4f65ba1de 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -872,30 +872,9 @@ bool parser::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::getExtraOptionNames(std::vector &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 implementation // bool parser::parse(Option &O, const char *ArgName, -- cgit v1.2.3-18-g5258