fix the gcc build
[oota-llvm.git] / include / llvm / Object / Binary.h
index d5bb182442c7e6a63eb3f7426c9e39d29e7bcc46..23c66eae2056324bdbade3dda7fde79e07c31f1b 100644 (file)
@@ -137,6 +137,7 @@ public:
   OwningBinary();
   OwningBinary(std::unique_ptr<T> Bin, std::unique_ptr<MemoryBuffer> Buf);
   OwningBinary(OwningBinary<T>&& Other);
+  OwningBinary<T> &operator=(OwningBinary<T> &&Other);
 
   std::unique_ptr<T> &getBinary();
   std::unique_ptr<MemoryBuffer> &getBuffer();
@@ -153,6 +154,13 @@ template <typename T>
 OwningBinary<T>::OwningBinary(OwningBinary &&Other)
     : Bin(std::move(Other.Bin)), Buf(std::move(Other.Buf)) {}
 
+template <typename T>
+OwningBinary<T> &OwningBinary<T>::operator=(OwningBinary &&Other) {
+  Bin = std::move(Other.Bin);
+  Buf = std::move(Other.Buf);
+  return *this;
+}
+
 template <typename T> std::unique_ptr<T> &OwningBinary<T>::getBinary() {
   return Bin;
 }