[llvm-commits] [llvm] r86148 - /llvm/trunk/include/llvm/Support/CommandLine.h
Douglas Gregor
dgregor at apple.com
Thu Nov 5 10:30:51 PST 2009
Author: dgregor
Date: Thu Nov 5 12:30:50 2009
New Revision: 86148
URL: http://llvm.org/viewvc/llvm-project?rev=86148&view=rev
Log:
Move llvm::cl::opt's conversion function into the base classes that
actually need that conversion function. Silences a Clang++ warning.
Modified:
llvm/trunk/include/llvm/Support/CommandLine.h
Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=86148&r1=86147&r2=86148&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Thu Nov 5 12:30:50 2009
@@ -781,6 +781,8 @@
DataType &getValue() { check(); return *Location; }
const DataType &getValue() const { check(); return *Location; }
+
+ operator DataType() const { return this->getValue(); }
};
@@ -816,6 +818,8 @@
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; }
};
@@ -865,8 +869,6 @@
ParserClass &getParser() { return Parser; }
- operator DataType() const { return this->getValue(); }
-
template<class T>
DataType &operator=(const T &Val) {
this->setValue(Val);
More information about the llvm-commits
mailing list