aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-28 02:08:47 +0000
committerChris Lattner <sabre@nondot.org>2009-03-28 02:08:47 +0000
commite8b64106ecf1057c7506d44ec8f64b5c83ee51c7 (patch)
tree552b0233a124834ede9ca93feab8238ece0210f9 /lib/Support
parenta80efceb93211a22e13dfc68198da4a25c1a7762 (diff)
downloadexternal_llvm-e8b64106ecf1057c7506d44ec8f64b5c83ee51c7.zip
external_llvm-e8b64106ecf1057c7506d44ec8f64b5c83ee51c7.tar.gz
external_llvm-e8b64106ecf1057c7506d44ec8f64b5c83ee51c7.tar.bz2
move a large method out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 2c56e0f..f3f198b 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -877,6 +877,25 @@ bool parser<bool>::parse(Option &O, const char *ArgName,
return false;
}
+void parser<bool>::getExtraOptionNames(std::vector<const char*> &OptionNames) {
+ if (!IsInvertable)
+ 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,