Fix the C++03 build.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 8 Jan 2014 22:27:04 +0000 (22:27 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 8 Jan 2014 22:27:04 +0000 (22:27 +0000)
With c++11 we never instantiate the copy constructor.

llvm-svn: 198803

llvm/include/llvm/Support/ErrorOr.h

index fba6705..bc376e9 100644 (file)
@@ -203,7 +203,7 @@ private:
     } else {
       // Get other's error.
       HasError = true;
-      new (getErrorStorage()) error_code(Other);
+      new (getErrorStorage()) error_code(Other.getError());
     }
   }