diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Support/CommandLine.h | 15 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h index ed2559bd2b..97b223c738 100644 --- a/include/Support/CommandLine.h +++ b/include/Support/CommandLine.h @@ -516,6 +516,21 @@ struct parser<int> : public basic_parser<int> { //-------------------------------------------------- +// parser<unsigned> +// +template<> +struct parser<unsigned> : public basic_parser<unsigned> { + + // parse - Return true on error. + bool parse(Option &O, const char *ArgName, const std::string &Arg, + unsigned &Val); + + // getValueName - Overload in subclass to provide a better default value. + virtual const char *getValueName() const { return "uint"; } +}; + + +//-------------------------------------------------- // parser<double> // template<> diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index ed2559bd2b..97b223c738 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -516,6 +516,21 @@ struct parser<int> : public basic_parser<int> { //-------------------------------------------------- +// parser<unsigned> +// +template<> +struct parser<unsigned> : public basic_parser<unsigned> { + + // parse - Return true on error. + bool parse(Option &O, const char *ArgName, const std::string &Arg, + unsigned &Val); + + // getValueName - Overload in subclass to provide a better default value. + virtual const char *getValueName() const { return "uint"; } +}; + + +//-------------------------------------------------- // parser<double> // template<> |