From 4d79724e130e69e3ce6327680460f399c18cb7eb Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 23 Jan 2013 00:22:30 +0000 Subject: [PATCH] [Support][ErrorOr] Don't use nullptr :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173212 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/ErrorOr.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index 13705c887ea..452d85ceecf 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -336,9 +336,9 @@ protected: template <> class ErrorOr { 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 ErrorOr(UserDataT UD, typename enable_if_c::value>::type* = 0) - : Error(nullptr, 0) { + : Error(0, 0) { ErrorHolderBase *E = new ErrorHolder(llvm_move(UD)); E->Error = ErrorOrUserDataTraits::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) { -- 2.34.1