summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOUniversal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/MachOUniversal.cpp')
-rw-r--r--llvm/lib/Object/MachOUniversal.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Object/MachOUniversal.cpp b/llvm/lib/Object/MachOUniversal.cpp
index 4ba5d968649..ece652b4c09 100644
--- a/llvm/lib/Object/MachOUniversal.cpp
+++ b/llvm/lib/Object/MachOUniversal.cpp
@@ -88,10 +88,11 @@ std::error_code MachOUniversalBinary::ObjectForArch::getAsArchive(
std::string ObjectName = Parent->getFileName().str();
std::unique_ptr<MemoryBuffer> ObjBuffer(
MemoryBuffer::getMemBuffer(ObjectData, ObjectName, false));
- ErrorOr<Archive *> Obj = Archive::create(std::move(ObjBuffer));
+ ErrorOr<std::unique_ptr<Archive>> Obj =
+ Archive::create(std::move(ObjBuffer));
if (std::error_code EC = Obj.getError())
return EC;
- Result.reset(Obj.get());
+ Result = std::move(Obj.get());
return object_error::success;
}
return object_error::parse_failed;
OpenPOWER on IntegriCloud