From d2e985fd323c167e20f77b045a1d99ad166e65db Mon Sep 17 00:00:00 2001 From: rdivacky Date: Wed, 18 Nov 2009 14:58:34 +0000 Subject: Update LLVM to r89205. --- include/llvm/Support/CommandLine.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/llvm/Support/CommandLine.h') diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index ca32f75..2e65fdd 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -495,7 +495,8 @@ public: //-------------------------------------------------- // basic_parser - Super class of parsers to provide boilerplate code // -struct basic_parser_impl { // non-template implementation of basic_parser +class basic_parser_impl { // non-template implementation of basic_parser +public: virtual ~basic_parser_impl() {} enum ValueExpected getValueExpectedFlagDefault() const { @@ -525,7 +526,8 @@ struct basic_parser_impl { // non-template implementation of basic_parser // a typedef for the provided data type. // template -struct basic_parser : public basic_parser_impl { +class basic_parser : public basic_parser_impl { +public: typedef DataType parser_data_type; }; @@ -779,6 +781,8 @@ public: DataType &getValue() { check(); return *Location; } const DataType &getValue() const { check(); return *Location; } + + operator DataType() const { return this->getValue(); } }; @@ -814,6 +818,8 @@ public: DataType &getValue() { return Value; } DataType getValue() const { return Value; } + operator DataType() const { return getValue(); } + // If the datatype is a pointer, support -> on it. DataType operator->() const { return Value; } }; @@ -863,8 +869,6 @@ public: ParserClass &getParser() { return Parser; } - operator DataType() const { return this->getValue(); } - template DataType &operator=(const T &Val) { this->setValue(Val); -- cgit v1.1