aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
-rw-r--r--llvm/lib/Object/Archive.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp
index 6387791..3c68340 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<MemoryBuffer> Buff(BuffOrErr.get().release());
- return createBinary(Buff, Context);
+ return createBinary(*BuffOrErr, Context);
}
ErrorOr<Archive *> Archive::create(std::unique_ptr<MemoryBuffer> Source) {