diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-15 21:17:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-15 21:17:37 +0000 |
commit | b3514569d078065ced56562e01fd5a39e01543da (patch) | |
tree | 7eda7d57d76c9a912554e537275e0109b25cbe15 /include/llvm/Support/CommandLine.h | |
parent | f5b0accf43a4fa22fc6050daac59441e3c9288b0 (diff) |
CommandLine: Add support for 64 bit unsigned integer options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CommandLine.h')
-rw-r--r-- | include/llvm/Support/CommandLine.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index ba8fbee94f..c6b62a8df9 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -806,6 +806,28 @@ public: EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<unsigned>); //-------------------------------------------------- +// parser<unsigned long long> +// +template<> +class parser<unsigned long long> : public basic_parser<unsigned long long> { +public: + // parse - Return true on error. + bool parse(Option &O, StringRef ArgName, StringRef Arg, + unsigned long long &Val); + + // getValueName - Overload in subclass to provide a better default value. + virtual const char *getValueName() const { return "uint"; } + + void printOptionDiff(const Option &O, unsigned long long V, OptVal Default, + size_t GlobalWidth) const; + + // An out-of-line virtual method to provide a 'home' for this class. + virtual void anchor(); +}; + +EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<unsigned long long>); + +//-------------------------------------------------- // parser<double> // template<> |