Pass a std::unique_ptr& to the create??? methods is lib/Object.
[oota-llvm.git] / include / llvm / Object / Binary.h
index a87a0064509c1698641e14751ff1e27ae751d867..258a885d4f6ec0a80a552d1e9f7032c9853f35c9 100644 (file)
@@ -128,7 +128,7 @@ public:
 /// @param Source The data to create the Binary from. Ownership is transferred
 ///        to the Binary if successful. If an error is returned,
 ///        Source is destroyed by createBinary before returning.
-ErrorOr<Binary *> createBinary(MemoryBuffer *Source,
+ErrorOr<Binary *> createBinary(std::unique_ptr<MemoryBuffer> &Source,
                                LLVMContext *Context = nullptr);
 
 ErrorOr<Binary *> createBinary(StringRef Path);