[llvm] r213556 - Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr.
David Blaikie
dblaikie at gmail.com
Mon Jul 21 09:23:21 PDT 2014
Author: dblaikie
Date: Mon Jul 21 11:23:21 2014
New Revision: 213556
URL: http://llvm.org/viewvc/llvm-project?rev=213556&view=rev
Log:
Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr.
Modified:
llvm/trunk/lib/Object/Archive.cpp
Modified: llvm/trunk/lib/Object/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=213556&r1=213555&r2=213556&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Archive.cpp (original)
+++ llvm/trunk/lib/Object/Archive.cpp Mon Jul 21 11:23:21 2014
@@ -181,8 +181,7 @@ Archive::Child::getAsBinary(LLVMContext
if (std::error_code EC = BuffOrErr.getError())
return EC;
- std::unique_ptr<MemoryBuffer> Buff(BuffOrErr.get().release());
- return createBinary(Buff, Context);
+ return createBinary(*BuffOrErr, Context);
}
ErrorOr<Archive *> Archive::create(std::unique_ptr<MemoryBuffer> Source) {
More information about the llvm-commits
mailing list