From d2a6fc397ee982936dee7dd5692b1481bcd9fe8f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Jun 2003 15:47:20 +0000 Subject: Add support for 'unsigned' command line arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6928 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CommandLine.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/llvm/Support/CommandLine.h') 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 @@ -515,6 +515,21 @@ struct parser : public basic_parser { }; +//-------------------------------------------------- +// parser +// +template<> +struct parser : public basic_parser { + + // 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 // -- cgit v1.2.3