From dc01ca18966e91793d8e7ca14be6dfc12a662f38 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 21 Jul 2014 16:23:21 +0000 Subject: Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr. llvm-svn: 213556 --- llvm/lib/Object/Archive.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Object') diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp index 63877913937..3c683408969 100644 --- a/llvm/lib/Object/Archive.cpp +++ b/llvm/lib/Object/Archive.cpp @@ -181,8 +181,7 @@ Archive::Child::getAsBinary(LLVMContext *Context) const { if (std::error_code EC = BuffOrErr.getError()) return EC; - std::unique_ptr Buff(BuffOrErr.get().release()); - return createBinary(Buff, Context); + return createBinary(*BuffOrErr, Context); } ErrorOr Archive::create(std::unique_ptr Source) { -- cgit v1.2.3