summaryrefslogtreecommitdiff
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
commit217a29303dfbd51093d2cefa3c24460520935f85 (patch)
tree38fac50e1f74cfeb976e994a22b6fe7e868a529c
parentb3ea6d7ce7cdc3a7c5a49257cc28fdba56670d4f (diff)
downloadllvm-217a29303dfbd51093d2cefa3c24460520935f85.tar.gz
llvm-217a29303dfbd51093d2cefa3c24460520935f85.tar.bz2
llvm-217a29303dfbd51093d2cefa3c24460520935f85.tar.xz
Use the existing typedef to avoid forming a reference to a reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198817 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/ErrorOr.h4
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();