diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h index ddf0e89b408..9bbf6a0d809 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h @@ -36,16 +36,13 @@ protected: // This form of the constructor allows subclasses to use // format-specific subclasses of ObjectFile directly - ObjectImageCommon(ObjectBuffer *Input, std::unique_ptr<object::ObjectFile> Obj) - : ObjectImage(Input), // saves Input as Buffer and takes ownership - ObjFile(std::move(Obj)) - { - } + ObjectImageCommon(std::unique_ptr<ObjectBuffer> Input, + std::unique_ptr<object::ObjectFile> Obj) + : ObjectImage(std::move(Input)), ObjFile(std::move(Obj)) {} public: - ObjectImageCommon(ObjectBuffer* Input) - : ObjectImage(Input) // saves Input as Buffer and takes ownership - { + ObjectImageCommon(std::unique_ptr<ObjectBuffer> Input) + : ObjectImage(std::move(Input)) { // FIXME: error checking? createObjectFile returns an ErrorOr<ObjectFile*> // and should probably be checked for failure. MemoryBufferRef Buf = Buffer->getMemBuffer(); |