From d8fa9295c853695900eaede718ce75125c9baf68 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 21 Jul 2014 16:23:21 +0000 Subject: [PATCH] Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213556 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/Archive.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Object/Archive.cpp b/lib/Object/Archive.cpp index 63877913937..3c683408969 100644 --- a/lib/Object/Archive.cpp +++ b/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) {