Use std::unique_ptr to make the ownership explicit.
[oota-llvm.git] / include / llvm / Object / Binary.h
index 91984cb527156940d9d47b5e2418373ea056fc1d..1fd997c082c2d179cb0a532f500794e147fb7208 100644 (file)
@@ -126,10 +126,11 @@ public:
 /// @brief Create a Binary from Source, autodetecting the file type.
 ///
 /// @param Source The data to create the Binary from.
-ErrorOr<Binary *> createBinary(std::unique_ptr<MemoryBuffer> Source,
-                               LLVMContext *Context = nullptr);
+ErrorOr<std::unique_ptr<Binary>>
+createBinary(std::unique_ptr<MemoryBuffer> Source,
+             LLVMContext *Context = nullptr);
 
-ErrorOr<Binary *> createBinary(StringRef Path);
+ErrorOr<std::unique_ptr<Binary>> createBinary(StringRef Path);
 }
 }