diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-28 02:08:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-28 02:08:47 +0000 |
commit | 75166689986f6b7f04708e665485b9fdd808bb79 (patch) | |
tree | a80e7596f00edbfdaada44712cb4ba084ce04132 /llvm/lib/Support/CommandLine.cpp | |
parent | a6f4ca2b6ff423e4f72c84f357f613e124e95f59 (diff) | |
download | llvm-75166689986f6b7f04708e665485b9fdd808bb79.zip llvm-75166689986f6b7f04708e665485b9fdd808bb79.tar.gz llvm-75166689986f6b7f04708e665485b9fdd808bb79.tar.bz2 |
move a large method out of line.
llvm-svn: 67892
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 2c56e0f..f3f198b 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/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, |