From 437b0d588703adbfb01e7c77ec8f40d85ddd573b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 31 Jul 2014 03:12:45 +0000 Subject: Use std::unique_ptr to make the ownership explicit. llvm-svn: 214377 --- llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld') diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h index c3a21823bbc..51e39e32e7a 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h @@ -49,7 +49,7 @@ public: // FIXME: error checking? createObjectFile returns an ErrorOr // and should probably be checked for failure. std::unique_ptr Buf(Buffer->getMemBuffer()); - ObjFile.reset(object::ObjectFile::createObjectFile(Buf).get()); + ObjFile = std::move(object::ObjectFile::createObjectFile(Buf).get()); } ObjectImageCommon(std::unique_ptr Input) : ObjectImage(nullptr), ObjFile(std::move(Input)) {} -- cgit v1.2.3