From ed9709d928ff3684bc1d646badcf068689ce232d Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 3 Sep 2014 19:48:09 +0000 Subject: unique_ptrify a bunch of stuff through RuntimeDyld::loadObject llvm-svn: 217065 --- llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h') 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 Obj) - : ObjectImage(Input), // saves Input as Buffer and takes ownership - ObjFile(std::move(Obj)) - { - } + ObjectImageCommon(std::unique_ptr Input, + std::unique_ptr 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 Input) + : ObjectImage(std::move(Input)) { // FIXME: error checking? createObjectFile returns an ErrorOr // and should probably be checked for failure. MemoryBufferRef Buf = Buffer->getMemBuffer(); -- cgit v1.2.3