summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ErrorOr.h
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-19 08:30:55 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-19 08:30:55 +0000
commit70416f80a7147ccecf1ae980b01c9064811c67a8 (patch)
treeb8f68bfec8981cfa92b996a61f85bd01654d296f /include/llvm/Support/ErrorOr.h
parentfa0cf99585b02b4f2491e195213d9d6d6704ca8f (diff)
downloadllvm-70416f80a7147ccecf1ae980b01c9064811c67a8.tar.gz
llvm-70416f80a7147ccecf1ae980b01c9064811c67a8.tar.bz2
llvm-70416f80a7147ccecf1ae980b01c9064811c67a8.tar.xz
Try to revive buildbots after r201620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ErrorOr.h')
-rw-r--r--include/llvm/Support/ErrorOr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h
index 39fec3b5ae..1e29b3d352 100644
--- a/include/llvm/Support/ErrorOr.h
+++ b/include/llvm/Support/ErrorOr.h
@@ -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();