diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-01-23 00:22:30 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-01-23 00:22:30 +0000 |
commit | 4d79724e130e69e3ce6327680460f399c18cb7eb (patch) | |
tree | 6fef70e5754d8b489c605f43fae12da40709e54e /include/llvm/Support | |
parent | 70d2ca0725b05a2d372e4dc3336e8ea350093e98 (diff) |
[Support][ErrorOr] Don't use nullptr :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/ErrorOr.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index 13705c887e..452d85ceec 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -336,9 +336,9 @@ protected: template <> class ErrorOr<void> { public: - ErrorOr() : Error(nullptr, 0) {} + ErrorOr() : Error(0, 0) {} - ErrorOr(llvm::error_code EC) : Error(nullptr, 0) { + ErrorOr(llvm::error_code EC) : Error(0, 0) { if (EC == errc::success) { Error.setInt(1); return; @@ -352,14 +352,14 @@ public: template<class UserDataT> ErrorOr(UserDataT UD, typename enable_if_c<ErrorOrUserDataTraits<UserDataT>::value>::type* = 0) - : Error(nullptr, 0) { + : Error(0, 0) { ErrorHolderBase *E = new ErrorHolder<UserDataT>(llvm_move(UD)); E->Error = ErrorOrUserDataTraits<UserDataT>::error(); E->HasUserData = true; Error.setPointer(E); } - ErrorOr(const ErrorOr &Other) : Error(nullptr, 0) { + ErrorOr(const ErrorOr &Other) : Error(0, 0) { Error = Other.Error; if (Other.Error.getPointer()->Error) { Error.getPointer()->aquire(); @@ -377,11 +377,11 @@ public: } #if LLVM_HAS_RVALUE_REFERENCES - ErrorOr(ErrorOr &&Other) : Error(nullptr) { + ErrorOr(ErrorOr &&Other) : Error(0) { // Get other's error. Error = Other.Error; // Tell other not to do any destruction. - Other.Error.setPointer(nullptr); + Other.Error.setPointer(0); } ErrorOr &operator =(ErrorOr &&Other) { |