diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-09 00:25:25 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-09 00:25:25 +0000 |
| commit | d2d23ed04a08eb04ef2d6d0a89284f1f510e9d96 (patch) | |
| tree | 9f9be4247dbda0f6e47f521f5cfd4bc51b6c1587 /llvm | |
| parent | 32e1be7bd0fa651cc9240ffb082ccd7e8ae319ce (diff) | |
| download | bcm5719-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.h | 4 |
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(); |

