summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-28 15:47:20 +0000
committerChris Lattner <sabre@nondot.org>2003-06-28 15:47:20 +0000
commitd2a6fc397ee982936dee7dd5692b1481bcd9fe8f (patch)
tree18334c195e72532f5d044c5f3ce2c402ae85bba1 /include/llvm/Support/CommandLine.h
parent3a56364f00b96a238f5de76a2c54bb34be8fd66f (diff)
downloadllvm-d2a6fc397ee982936dee7dd5692b1481bcd9fe8f.tar.gz
llvm-d2a6fc397ee982936dee7dd5692b1481bcd9fe8f.tar.bz2
llvm-d2a6fc397ee982936dee7dd5692b1481bcd9fe8f.tar.xz
Add support for 'unsigned' command line arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CommandLine.h')
-rw-r--r--include/llvm/Support/CommandLine.h15
1 files changed, 15 insertions, 0 deletions
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<>