unique_ptrify a bunch of stuff through RuntimeDyld::loadObject
llvm-svn: 217065
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
index 8a00c0b..bae7ca8 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
@@ -103,8 +103,9 @@
public:
/// Create an ObjectImage from the given ObjectBuffer.
- static ObjectImage *createObjectImage(ObjectBuffer *InputBuffer) {
- return new ObjectImageCommon(InputBuffer);
+ static std::unique_ptr<ObjectImage>
+ createObjectImage(std::unique_ptr<ObjectBuffer> InputBuffer) {
+ return llvm::make_unique<ObjectImageCommon>(std::move(InputBuffer));
}
/// Create an ObjectImage from the given ObjectFile.