summaryrefslogtreecommitdiffstats
path: root/llvm/include/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
commit719c715639217a978dacc5863243d5e0e07b1d4d (patch)
treec522c1540cfe4a941df59c7360554498182019f6 /llvm/include/Support/CommandLine.h
parentabebb9af114dd887f1909de8fa73cb434159a618 (diff)
downloadbcm5719-llvm-719c715639217a978dacc5863243d5e0e07b1d4d.tar.gz
bcm5719-llvm-719c715639217a978dacc5863243d5e0e07b1d4d.zip
Add support for 'unsigned' command line arguments
llvm-svn: 6928
Diffstat (limited to 'llvm/include/Support/CommandLine.h')
-rw-r--r--llvm/include/Support/CommandLine.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/include/Support/CommandLine.h b/llvm/include/Support/CommandLine.h
index ed2559bd2b9..97b223c7381 100644
--- a/llvm/include/Support/CommandLine.h
+++ b/llvm/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<>
OpenPOWER on IntegriCloud