OSDN Git Service

Try to revive buildbots after r201620
authorAlexey Samsonov <samsonov@google.com>
Wed, 19 Feb 2014 08:30:55 +0000 (08:30 +0000)
committerAlexey Samsonov <samsonov@google.com>
Wed, 19 Feb 2014 08:30:55 +0000 (08:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201651 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ErrorOr.h

index 39fec3b..1e29b3d 100644 (file)
@@ -103,6 +103,7 @@ public:
 
 private:
   typedef typename remove_reference<T>::type &reference;
+  typedef const typename remove_reference<T>::type &const_reference;
   typedef typename remove_reference<T>::type *pointer;
 
 public:
@@ -175,7 +176,7 @@ public:
   }
 
   reference get() { return *getStorage(); }
-  const reference get() const { return const_cast<ErrorOr<T> >(this)->get(); }
+  const_reference get() const { return const_cast<ErrorOr<T> >(this)->get(); }
 
   error_code getError() const {
     return HasError ? *getErrorStorage() : error_code::success();