diff options
-rw-r--r-- | include/llvm/Support/ErrorOr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index bc376e97ae..4914a1d7d5 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -178,8 +178,8 @@ public: return HasError ? 0 : unspecified_bool_true; } - T &get() { return *getStorage(); } - const T &get() const { return const_cast<ErrorOr<T> >(this)->get(); } + reference get() { return *getStorage(); } + const reference get() const { return const_cast<ErrorOr<T> >(this)->get(); } error_code getError() const { return HasError ? *getErrorStorage() : error_code::success(); |