summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-09 00:25:25 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-09 00:25:25 +0000
commitd2d23ed04a08eb04ef2d6d0a89284f1f510e9d96 (patch)
tree9f9be4247dbda0f6e47f521f5cfd4bc51b6c1587 /llvm
parent32e1be7bd0fa651cc9240ffb082ccd7e8ae319ce (diff)
downloadbcm5719-llvm-d2d23ed04a08eb04ef2d6d0a89284f1f510e9d96.tar.gz
bcm5719-llvm-d2d23ed04a08eb04ef2d6d0a89284f1f510e9d96.zip
Use the existing typedef to avoid forming a reference to a reference.
llvm-svn: 198817
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/ErrorOr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/ErrorOr.h b/llvm/include/llvm/Support/ErrorOr.h
index bc376e97aef..4914a1d7d5f 100644
--- a/llvm/include/llvm/Support/ErrorOr.h
+++ b/llvm/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();
OpenPOWER on IntegriCloud