From 2272ca3d4408046fd1b5fac78b98b31ec94ddfe2 Mon Sep 17 00:00:00 2001
From: Douglas Gregor <dgregor@apple.com>
Date: Thu, 5 Nov 2009 18:30:50 +0000
Subject: [PATCH] Move llvm::cl::opt's conversion function into the base
 classes that actually need that conversion function. Silences a Clang++
 warning.

llvm-svn: 86148
---
 include/llvm/Support/CommandLine.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 60be345726a..2e65fdd79a1 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -781,6 +781,8 @@ public:
 
   DataType &getValue() { check(); return *Location; }
   const DataType &getValue() const { check(); return *Location; }
+  
+  operator DataType() const { return this->getValue(); }
 };
 
 
@@ -816,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; }
 };
@@ -865,8 +869,6 @@ public:
 
   ParserClass &getParser() { return Parser; }
 
-  operator DataType() const { return this->getValue(); }
-
   template<class T>
   DataType &operator=(const T &Val) {
     this->setValue(Val);